GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 39

GATE CSE 2015 Set 3 Q39

Database Management Systems · Indexing, Storage & Query Processing · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q39 2 marks · NAT
Report issue

Indexing, Storage & Query Processing

Question 39, GATE 2015: A B+ tree has search keys of 12 bytes, blocks of 1024 bytes, record pointers of 10 bytes, and block pointers of 8 bytes. What is the maximum number of keys that fit in each non-leaf node? Use the usual internal-node layout with one more child pointer than keys and no additional stated overhead.
Tap to enlarge
Answer & solution

Official answer: 50

1. For k=50 the node uses 50·12+51·8=1008 bytes, which fits. For k=51 it needs 51·12+52·8=1028 bytes, exceeding the block. These adjacent checks establish the maximum, not just a rounded estimate.

2. An internal node with k keys has k+1 child pointers, so 12k+8(k+1)≤1024. Thus20k≤1016 and k≤50. Record pointers belong in leaves and are not counted here.

Original paper, page 66 · Answer key