Mock Quiz Hub
Dark
Mock Quiz Hub
1
Recent Updates
Added: OS Mid 1 Quiz
Added: OS Mid 2 Quiz
Added: OS Lab 1 Quiz
Check back for more updates!
Time: 00:00
Quiz
Navigate through questions using the controls below
0%
Question 1 of 60
Quiz ID: q1
What is the primary purpose of indexing mechanisms in databases?
To reduce storage space requirements
To speed up access to desired data
To improve data security
To compress data files
Question 2 of 60
Quiz ID: q2
What is a search key in the context of database indexing?
A password used to access the database
An encryption key for data security
An attribute or set of attributes used to look up records in a file
A primary key constraint
Question 3 of 60
Quiz ID: q3
An index file consists of records called index entries. What is the typical structure of an index entry?
search-key and pointer
primary key and foreign key
data value and timestamp
record ID and checksum
Question 4 of 60
Quiz ID: q4
What are the two basic kinds of indices mentioned in the lecture?
Primary and secondary indices
Dense and sparse indices
Ordered indices and hash indices
Clustered and non-clustered indices
Question 5 of 60
Quiz ID: q5
Which of the following is NOT mentioned as an index evaluation metric?
Access time
Insertion time
Compression ratio
Space overhead
Question 6 of 60
Quiz ID: q6
In ordered indices, how are index entries stored?
In random order for faster access
Sorted on the search key value
In chronological order of insertion
Grouped by data type
Question 7 of 60
Quiz ID: q7
What is a clustering index?
An index that groups similar records together
An index whose search key specifies the sequential order of the file
An index that uses clustering algorithms
An index distributed across multiple servers
Question 8 of 60
Quiz ID: q8
What is another name for a clustering index?
Secondary index
Primary index
Dense index
Sparse index
Question 9 of 60
Quiz ID: q9
What is a secondary index?
A backup copy of the primary index
An index created after the primary index
An index whose search key specifies an order different from the sequential order of the file
An index with lower priority than the primary index
Question 10 of 60
Quiz ID: q10
What is an index-sequential file?
A file with multiple indices
An ordered sequential file with a primary index
A file stored in sequential order only
A file with hash-based indexing
Question 11 of 60
Quiz ID: q11
What characterizes a dense index?
It has more pointers than records
Index record appears for every search-key value in the file
It uses compression to reduce space
It only indexes frequently accessed records
Question 12 of 60
Quiz ID: q12
In the context of dense indices, what does the example of 'index on ID attribute of instructor relation' illustrate?
How to create composite indices
That every instructor ID has a corresponding index entry
How to handle duplicate keys
The use of hash functions in indexing
Question 13 of 60
Quiz ID: q13
What is a sparse index?
An index with missing or corrupted entries
An index that contains index records for only some search-key values
An index with low storage utilization
An index that uses minimal memory
Question 14 of 60
Quiz ID: q14
When is a sparse index applicable?
When records are randomly distributed
When records are sequentially ordered on search-key
When the file is very small
When fast insertion is required
Question 15 of 60
Quiz ID: q15
To locate a record with search-key value K in a sparse index, what is the procedure?
Find index record with search-key value exactly equal to K
Find index record with largest search-key value < K, then search sequentially
Use binary search on all index entries
Hash the key value K to find the location
Question 16 of 60
Quiz ID: q16
Compared to dense indices, what are the advantages of sparse indices?
Faster record location and better accuracy
Less space and less maintenance overhead for insertions and deletions
Better support for range queries
Higher data integrity and consistency
Question 17 of 60
Quiz ID: q17
What is a disadvantage of sparse indices compared to dense indices?
They require more storage space
They are generally slower for locating records
They cannot handle range queries
They are more complex to implement
Question 18 of 60
Quiz ID: q18
What is recommended as a good tradeoff for sparse indices?
One index entry per record
One index entry for every block in file, corresponding to least search-key value in the block
One index entry per page in memory
One index entry per data type
Question 19 of 60
Quiz ID: q19
Why might a multilevel index be necessary?
To improve data security
If primary index does not fit in memory, making access expensive
To support multiple data types
To enable parallel processing
Question 20 of 60
Quiz ID: q20
In a multilevel index, what is the outer index?
The primary index file
A dense index of all records
A sparse index of the primary index
An index stored in memory
Question 21 of 60
Quiz ID: q21
In a multilevel index, what is the inner index?
A sparse index of the outer index
The primary index file
A hash-based index
A compressed version of the data
Question 22 of 60
Quiz ID: q22
What happens when even the outer index is too large to fit in main memory?
The system crashes
Data must be compressed
Yet another level of index can be created
The file must be reorganized
Question 23 of 60
Quiz ID: q23
What maintenance requirement applies to multilevel indices?
Only the outer index needs updating
Only the inner index needs updating
Indices at all levels must be updated on insertion or deletion
No maintenance is required
Question 24 of 60
Quiz ID: q24
Why might one want secondary indices?
To replace primary indices
To find records based on fields other than the primary index search-key
To improve insertion performance
To reduce storage requirements
Question 25 of 60
Quiz ID: q25
In the instructor relation example, if records are stored sequentially by ID, what would require a secondary index?
Finding instructors by ID
Finding all instructors in a particular department
Inserting new instructor records
Deleting instructor records
Question 26 of 60
Quiz ID: q26
In secondary indices, what does an index record point to when multiple records have the same search-key value?
The first record with that value
A random record with that value
A bucket containing pointers to all actual records with that value
The last record with that value
Question 27 of 60
Quiz ID: q27
Why do secondary indices have to be dense?
To improve performance
Because records are not sequentially ordered on the secondary index search-key
To reduce storage space
To simplify implementation
Question 28 of 60
Quiz ID: q28
What is a major disadvantage of having multiple indices on a file?
Reduced query performance
Updating indices imposes overhead on database modification
Increased storage for data
Complexity in index selection
Question 29 of 60
Quiz ID: q29
Why is sequential scan using a secondary index expensive?
Secondary indices are stored on slow media
Each record access may fetch a new block from disk
Secondary indices have poor compression
They require complex calculations
Question 30 of 60
Quiz ID: q30
According to the lecture, how long does a block fetch typically require compared to memory access?
About the same time
About 5 to 10 milliseconds versus 100 nanoseconds
About 1 second versus 1 millisecond
About 100 times longer
Question 31 of 60
Quiz ID: q31
What is a major disadvantage of indexed-sequential files?
They cannot support range queries
Performance degrades as file grows due to overflow blocks
They require too much memory
They don't support insertions
Question 32 of 60
Quiz ID: q32
What maintenance requirement is problematic for indexed-sequential files?
Daily index updates
Periodic reorganization of the entire file
Frequent memory allocation
Regular backup procedures
Question 33 of 60
Quiz ID: q33
What is a key advantage of B+-tree index files?
They use less storage space
They automatically reorganize with small, local changes
They provide faster sequential access
They eliminate the need for deletion operations
Question 34 of 60
Quiz ID: q34
According to the lecture, do B+-trees require reorganization of the entire file to maintain performance?
Yes, just like indexed-sequential files
No, reorganization of entire file is not required
Only during major updates
Only when the tree becomes unbalanced
Question 35 of 60
Quiz ID: q35
What is a minor disadvantage of B+-trees mentioned in the lecture?
Poor query performance
Extra insertion and deletion overhead, space overhead
Inability to handle large datasets
Complex implementation requirements
Question 36 of 60
Quiz ID: q36
Despite their disadvantages, why are B+-trees used extensively?
They are the only available option
The advantages outweigh the disadvantages
They are required by database standards
They have no maintenance costs
Question 37 of 60
Quiz ID: q37
In hash file organization, what is a bucket?
A hash function parameter
A unit of storage containing one or more records
A type of search key
A backup storage location
Question 38 of 60
Quiz ID: q38
How does hash file organization locate records?
By searching sequentially through all records
By using index entries to point to records
By obtaining the bucket directly from search-key value using a hash function
By sorting records first and then searching
Question 39 of 60
Quiz ID: q39
A hash function h maps from what to what?
Records to search keys
Set of all search-key values K to set of all bucket addresses B
Buckets to records
Indices to data files
Question 40 of 60
Quiz ID: q40
What operations use the hash function in hash file organization?
Only record access
Only insertion and deletion
Access, insertion, and deletion
Only sorting and searching
Question 41 of 60
Quiz ID: q41
Why might an entire bucket need to be searched sequentially in hash file organization?
Buckets are always sorted
Records with different search-key values may be mapped to the same bucket
Hash functions are unreliable
To maintain data integrity
Question 42 of 60
Quiz ID: q42
In the instructor file hash organization example, how many buckets are there?
5 buckets
10 buckets
15 buckets
20 buckets
Question 43 of 60
Quiz ID: q43
In the hash function example, what does h(Music) equal?
0
1
2
3
Question 44 of 60
Quiz ID: q44
What do h(Physics) and h(Elec. Eng.) both equal in the example?
2
3
4
5
Question 45 of 60
Quiz ID: q45
What represents the worst possible hash function?
A function that distributes keys evenly
A function that maps all search-key values to the same bucket
A function that uses complex calculations
A function that produces random results
Question 46 of 60
Quiz ID: q46
What characterizes an ideal hash function?
It minimizes computation time
It is uniform - each bucket is assigned the same number of search-key values
It uses simple arithmetic operations
It avoids all collisions
Question 47 of 60
Quiz ID: q47
Why should an ideal hash function be random?
To make it unpredictable for security
To ensure each bucket has the same number of records regardless of actual distribution
To speed up computation
To reduce storage requirements
Question 48 of 60
Quiz ID: q48
What do typical hash functions perform computation on?
The logical representation of search-key
The internal binary representation of the search-key
The ASCII values only
The length of the search-key
Question 49 of 60
Quiz ID: q49
What can cause bucket overflow in hash file organization?
Insufficient buckets and skew in distribution of records
Too many hash functions
Hardware failures
Network congestion
Question 50 of 60
Quiz ID: q50
What are two reasons for skew in distribution of records?
Hardware limitations and software bugs
Multiple records have same search-key value and chosen hash function produces non-uniform distribution
Network delays and disk failures
Memory constraints and CPU limitations
Question 51 of 60
Quiz ID: q51
How is bucket overflow handled in hash file organization?
By increasing the hash table size
By using overflow buckets
By compressing existing records
By rejecting new insertions
Question 52 of 60
Quiz ID: q52
What is overflow chaining?
Linking multiple hash functions together
The overflow buckets of a given bucket are chained together in a linked list
Creating chains of primary buckets
Connecting different hash tables
Question 53 of 60
Quiz ID: q53
What is the overflow chaining scheme called?
Open hashing
Closed hashing
Linear hashing
Dynamic hashing
Question 54 of 60
Quiz ID: q54
Why is open hashing not suitable for database applications?
It is too slow
It does not use overflow buckets
It requires too much memory
It cannot handle concurrent access
Question 55 of 60
Quiz ID: q55
What are bitmap indices designed for?
Compressing large datasets
Efficient querying on multiple keys
Fast sequential access
Reducing storage overhead
Question 56 of 60
Quiz ID: q56
How are records assumed to be organized in bitmap indices?
Randomly distributed
Sorted by primary key
Numbered sequentially from 0
Grouped by data type
Question 57 of 60
Quiz ID: q57
When is record retrieval particularly easy in bitmap indices?
When records are compressed
When records are of fixed size
When records are sorted
When records are encrypted
Question 58 of 60
Quiz ID: q58
Bitmap indices are applicable on attributes that have what characteristic?
Very large number of distinct values
Relatively small number of distinct values
Only numeric values
Only text values
Question 59 of 60
Quiz ID: q59
What is a bitmap in the context of bitmap indices?
A compressed image file
A graphical representation of data
Simply an array of bits
A hash table structure
Question 60 of 60
Quiz ID: q60
In a bitmap for value v, when is the bit for a record set to 1?
When the record is the first occurrence of value v
When the record has the value v for the attribute
When the record was recently accessed
When the record needs to be updated
Quiz Summary
Review your answers before submitting
60
Total Questions
0
Answered
60
Remaining
00:00
Time Spent
Submit Quiz
Back to Questions
Previous
Question 1 of 60
Next
!
Confirm Submission
Cancel
Submit Quiz