CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

A B+ tree index uses 512-byte blocks, 8-byte search keys, 4-byte block pointers and 6-byte record (data) pointers. Each leaf also keeps one block pointer to the next leaf. What is the maximum number of keys a LEAF node can hold?

  1. A. 42
  2. B. 43
  3. C. 36
  4. D. 35

Correct answer: C. 36

A leaf holds q (key, record-pointer) pairs plus one next-leaf pointer: 14·q + 4 ≤ 512 gives q = ⌊(512 − 4)/14⌋ = 36. Using the block-pointer size or forgetting the sibling pointer gives the traps.

More DBMS and SQL questions

Exams that ask this topic