0% found this document useful (0 votes)
13 views3 pages

Week 12

The document contains a series of questions related to B+ trees and B-trees, focusing on their advantages, structure, and operations. It covers topics such as search efficiency, key storage, and the effects of insertions and deletions. The questions also explore the differences between B+ trees and B-trees, including their use in databases and indexing.

Uploaded by

d24amtics082
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Week 12

The document contains a series of questions related to B+ trees and B-trees, focusing on their advantages, structure, and operations. It covers topics such as search efficiency, key storage, and the effects of insertions and deletions. The questions also explore the differences between B+ trees and B-trees, including their use in databases and indexing.

Uploaded by

d24amtics082
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1) Why is B+ tree preferred in databases over B-trees?

a) Because it uses more memory


b) Because it allows faster search and range queries
c) Because it stores duplicate values
d) Because it has a better deletion process

2) If a B+ tree of order 4 has a height of 3, what is the maximum number of keys it can
store?
a) 64
b) 80
c) 48
d) 60

3) Which of the following is true for a B+ tree but not for a B-tree?
a) It maintains sorted order of data
b) It has more space complexity
c) It supports better range queries
d) It does not allow duplicate keys

4) What is the advantage of B+ trees over B-trees?


a) Faster search due to storing all keys in internal nodes
b) More space-efficient
c) Supports range queries efficiently
d) Faster deletion process

5) What is the maximum height of a B-tree of order m storing n keys?


a) O(log m n)
b) O(n)
c) O(m log n)
d) O(1)

6) What happens when a node in a B-tree becomes full after insertion?


a) It remains unchanged
b) It splits into two nodes
c) It is deleted
d) It merges with another node

7) Which statement is true about B+ trees?


a) Leaf nodes store only indexes
b) All data is stored in internal nodes
c) Leaf nodes store actual data and are linked sequentially
d) It is a variant of binary tree
8) Which of the following is NOT a reason for preferring B+ trees in databases?
a) Efficient range queries
b) Better use of disk storage
c) Fast lookup of exact keys
d) Faster insertion than hash indexing

9) How does B+ tree improve efficiency in databases compared to B-tree?


a) By using smaller nodes
b) By allowing direct sequential access to data
c) By eliminating internal nodes
d) By increasing search complexity

10) Which of the following is true for a B-tree?


a) It is a binary search tree
b) All leaves are at the same level
c) It is a singly linked list
d) It does not support insertion

11) Which data structure is commonly used for indexing in Indexed Sequential Files?
a) Array
b) Linked List
c) B-Tree
d) Stack

12) What is an Indexed Sequential File?


a) A file where records are stored randomly
b) A file where records are stored sequentially and indexed for fast access
c) A file without any index
d) A file that only supports insertion, not deletion

13) What is the worst-case time complexity of inserting a key in a B-tree of order m and
height h?
a) O(h)
b) O(m)
c) O(log m n)
d) O(n)

14) What happens when a key is deleted from a leaf node in a B+ tree?
a) The key is simply removed without affecting the structure
b) The leaf node merges with another node if required
c) The root of the tree is deleted
d) A new node is added

15) In B+ trees, where is data stored?


a) In both internal and leaf nodes
b) Only in internal nodes
c) Only in leaf nodes
d) Data is not stored in a B+ tree
16) Which of the following is NOT a valid advantage of B+ trees over B-trees?
a) They use less memory
b) They provide better sequential access
c) They are faster for range queries
d) They maintain a balanced structure

17) What happens during deletion in a B-tree if a node has fewer than the minimum required
keys?
a) The node is deleted
b) A redistribution or merging of nodes occurs
c) The tree is reconstructed from scratch
d) Nothing changes

18) What is the time complexity of searching in a B-tree with n keys and order m?
a) O(n)
b) O(log m n)
c) O(m)
d) O(1)

19) Which of the following operations may cause a node to split in a B-tree?
a) Insertion
b) Deletion
c) Searching
d) Traversing

20) In a B-tree of order m, what is the maximum number of children a node can have?
a) m
b) m+1
c) m-1
d) 2m

You might also like