GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 63

B+ tree leaf capacity

Database Management Systems · Indexing, Storage & Query Processing · Full GATE CSE 2007 paper

GATE 2007, Q63 2 marks · MCQ
Report issue

Indexing, Storage & Query Processing

Question 63, GATE 2007: The order of a B+ tree leaf is the maximum number of (value,data-record-pointer) pairs it can hold. Block size is 1K bytes, value size 9 bytes, record-pointer size 7 bytes and block-pointer size 6 bytes. What is the leaf order?
Options:
(A) 63
(B) 64
(C) 67
(D) 68
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. Approach. Reserve space for the leaf’s next-block pointer before dividing the remaining bytes by entry size. Use 1K=1024 bytes and round the result down, because partial entries cannot be stored.

2. Derivation and interpretation. A leaf stores m pairs of 9-byte values and 7-byte record pointers, plus a 6-byte pointer to the next leaf. Therefore 16m+6 <= 1024, giving m <= floor(1018/16)=63. Answer A. Ignoring the leaf-link pointer would incorrectly give 64.

Original paper, page 16