The GATE Grind

GATE 2015 CS (CS3) – Question 39

Databases · File Organization and Indexing (B and B+ Trees) · 2 marks · Numerical answer

A B+ tree has 12-byte search keys, 1024-byte blocks, 10-byte record pointers and 8-byte block pointers. Find the maximum keys in a nonleaf node.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 50

Explanation

A nonleaf node with k keys stores k+1 child block pointers, not record pointers. Its space is 12k+8(k+1)=20k+8 bytes. Requiring 20k+8≤1024 gives k≤50.8, so at most fifty keys fit, with fifty-one child pointers.

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

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