CS FundamentalsHardGATE CS · Product placement

A B+ tree index uses 1024-byte blocks, 12-byte search keys, 10-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. 55
  2. B. 46
  3. C. 47
  4. D. 56

Correct answer: D. 56

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

More DBMS and SQL questions

Exams that ask this topic