ISRO Scientist/Engineer CSE 2017Databases › Indexing and B-Trees
ISRO Scientist/Engineer CSE 2017 PYQ: A B-Tree used as an index for a large database table has four levels including the root node. If a new key…
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are
- A5Correct answer
- B4
- C3
- D2
Answer
(A) $5$
Approach
Consider the worst-case insertion scenario in a B-Tree where every node along the path from the root to the target leaf is already full. When a new key is inserted, it causes an overflow at the leaf level, triggering a split. This split propagates upward, causing splits at each intermediate level and finally at the root. Since the tree has 4 levels, splits occur at all 4 existing levels, and the root split creates a new root, resulting in a total of 5 newly created nodes.
Reviewed by ISRO IQ Editorial Team.