The GATE Grind

GATE 2015 CS (CS2) – Question 32

Databases · File Organization and Indexing (B and B+ Trees) · 1 mark · Numerical answer

For the B+ tree of order 1 shown, find the minimum number of index nodes, including the root, fetched to retrieve all records with search key ≥7 and <15.

Diagram for GATE 2015 CS (CS2) question 32

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 5

Explanation

Search for seven visits the root, the left internal node and leaf [5,7]. Follow the leaf chain to [9,11] and then [13,15], taking the qualifying key thirteen but stopping before fifteen. Thus five index nodes are fetched. The right internal node need not be fetched because the leaves are linked.

More File Organization and Indexing (B and B+ Trees) questions

All File Organization and Indexing (B and B+ Trees) questions →