CS FundamentalsVery hardGATE CS (PYQ pattern) · Product Company SDE

A B-tree node must fit in a 4096-byte block; each key takes 12 bytes and each child pointer 8 bytes. What is the maximum order p (maximum number of child pointers) of the node?

  1. A. 246
  2. B. 205
  3. C. 164
  4. D. 204

Correct answer: B. 205

p·P + (p−1)·K ≤ B → p ≤ (B+K)/(P+K) = (4096+12)/20 = 205.4 → 205. Ignoring that keys are one fewer than pointers gives 204.

More DBMS and SQL questions

Exams that ask this topic