MCQs on Indexing (B-trees, Hash Indexing) in DBMS
- What is the primary purpose of using B-trees in indexing?A. To store data sequentially
B. To maintain sorted data and allow searches, insertions, deletions in logarithmic time
C. To provide direct access to records
D. To minimize disk space usage
Answer: B. To maintain sorted data and allow searches, insertions, deletions in logarithmic time - In a B-tree of order m, what is the maximum number of children a node can have?A. m-1
B. m
C. m+1
D. 2m
Answer: B. m - Which property is unique to B+ trees compared to B-trees?A. All values are stored at leaf nodes and internal nodes store only keys
B. Values can be stored at both internal and leaf nodes
C. Nodes can have a variable number of children
D. Leaf nodes are linked together to form a linked list
Answer: A. All values are stored at leaf nodes and internal nodes store only keys - What is a major advantage of using a B+ tree over a B-tree for indexing?A. Faster insertions and deletions
B. Sequential access to records is easier
C. Better handling of duplicate keys
D. Requires less memory
Answer: B. Sequential access to records is easier - In a hash index, what is the purpose of a hash function?A. To sort the keys
B. To encrypt the data
C. To compute the address of the data record
D. To compress the data
Answer: C. To compute the address of the data record - Which of the following is a disadvantage of hash indexing?A. Inefficient for range queries
B. Slow search performance
C. High memory usage
D. Complexity in implementation
Answer: A. Inefficient for range queries - In B-trees, what happens when a node becomes full and a new key is inserted?A. The node is split into two nodes
B. The new key is discarded
C. The tree is rebalanced
D. The node is expanded to accommodate the new key
Answer: A. The node is split into two nodes - What is the height of a B-tree with ‘n’ keys and minimum degree ‘t’?A. log_t(n)
B. log_t(n+1)
C. log_t((n+1)/2)
D. log_t((n-1)/2)
Answer: C. log_t((n+1)/2) - Which type of index is more efficient for exact-match queries?A. B-tree index
B. B+ tree index
C. Hash index
D. Dense index
Answer: C. Hash index - How does a B+ tree handle insertions when the leaf node is full?A. By creating a new tree
B. By splitting the leaf node and adjusting the parent node
C. By shifting the existing keys
D. By merging with an adjacent node
Answer: B. By splitting the leaf node and adjusting the parent node - In a hash table, what is a ‘collision’?A. When two keys generate the same hash value
B. When a key is not found
C. When the table is resized
D. When a key is deleted
Answer: A. When two keys generate the same hash value - Which of the following statements is true about B+ trees?A. They allow binary search
B. They do not maintain sorted order
C. They have all data at the leaf level
D. They do not support sequential access
Answer: C. They have all data at the leaf level - What is ‘rehashing’ in the context of hash indexing?A. Computing a new hash value for an existing key
B. Removing a key from the hash table
C. Increasing the size of the hash table and redistributing the keys
D. Sorting the keys in the hash table
Answer: C. Increasing the size of the hash table and redistributing the keys - In a B-tree, what is the minimum number of keys a node (except root) can have if the order is ‘m’?A. m-1
B. m/2
C. (m/2) – 1
D. (m/2) + 1
Answer: C. (m/2) – 1 - Which type of index is generally preferred for large databases with frequent insertions and deletions?A. B-tree index
B. B+ tree index
C. Hash index
D. Bitmap index
Answer: B. B+ tree index
More MCQs Of Database Systems
- Database Models MCQs in DBMS
- Relational Database Model MCQs in DBMS
- SQL (Structured Query Language) MCQs in DBMS
- Database Design MCQs in DBMS
- Database Management System Architecture MCQs in DBMS
- Storage and File Structure MCQs in DBMS
- Query Processing and Optimization MCQs in DBMS
- Database Transaction Management MCQs in DBMS
- Database Security and Authorization MCQs in DBMS
- Backup and Recovery MCQs in DBMS
- Distributed Databases MCQs in DBMS
- SET 1: database design mcqs (database design mcqs )
- SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
- SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
- SET 4: database systems mcqs (database systems mcqs)
- SET 5: dbms mcqs (dbms mcqs )
- SET 6: dbms mcqs with answers (dbms mcqs with answers)
- SET 7: solved mcqs of dbms (solved mcqs of dbms)
- SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
- SET 9: relational database management system mcqs(relational database management system mcqs)
- SET 10: solved mcqs of database management system(solved mcqs of database management system)
- SET 11: basic database mcqs pdf (basic database mcqs pdf)
- SET 12: relational database management system mcqs (relational database management system mcqs )
- SET 13: database mcqs online test (database mcqs online test)
- SET 14: database interview questions mcqs (database interview questions mcqs)
- SET 15: database developer mcqs (database developer mcqs)
- SET 16: database Repeated mcqs (database Repeated mcqs)
- SET 17: Database mcqs PPSC (Database mcqs PPSC)
- SET 18: Database mcqs FPSC (Database mcqs FPSC)
- SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)
New Arrival