ISRO Scientist/Engineer CSE 2018Databases › Indexing and B-Trees
ISRO Scientist/Engineer CSE 2018 PYQ: in a file which contains 1 million records and the order of the tree is 100, then what is the maximum number…
in a file which contains 1 million records and the order of the tree is 100, then what is the maximum number of nodes to be accessed if $B$+ tree index is used?
- A5
- B4Correct answer
- C3
- D10
Answer
(B) $4$
Approach
For a B+ tree of order $p=100$, each internal node has at most 100 pointers and at least $\lceil p/2 \rceil = 50$ pointers (minimum fill factor). To maximize the number of nodes accessed during a search, we assume the minimum possible fanout at each level. The number of leaf-level nodes needed to store $10^6$ records is $\lceil 10^6 / 50 \rceil = 20000$. Then we repeatedly divide by 50 to find the number of nodes at each higher level until we reach the root. The total number of levels gives the maximum number of nodes accessed.
Reviewed by ISRO IQ Editorial Team.