Skip to content
Official PYQ · 2000

GATE CS 2000 Q1.22 — File Organization and Indexing (B and B+ Trees)

Explain with AI

B+^{+}-trees are preferred to binary trees in databases because

Choose one option
View worked solution

Answer: B

The primary bottleneck in database systems is disk I/O (Input/Output). Accessing data from a secondary storage device (disk) is several orders of magnitude slower than accessing main memory (RAM).

To minimize the number of disk accesses, we need an indexing structure with a very small height:

  • Binary Search Trees (BSTs): Have a fan-out (branching factor) of at most 22. For NN records, the height of a balanced BST is O(mlog2N)O( m{log}_2 N). Searching a record requires traversing many levels, resulting in a high number of disk reads.
  • B+\text{B}^+-Trees: Have a very high fan-out dd (typically in the hundreds), because each node is designed to fit exactly into one disk block. The height of a B+\text{B}^+-tree is O(logdN)O(\rm{log}_d N). For example, if N=106N = 10^6 and d=100d = 100, the height is only ≈3\approx 3, meaning we need at most 3 disk accesses to find any record.

Thus, because disk access is much slower than memory access, B+\text{B}^+-trees are preferred to minimize disk reads by keeping the tree height extremely low.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore File Organization and Indexing (B and B+ Trees) questions