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?
- A. 246
- B. 205
- C. 164
- 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
- Relation R has 2000 tuples with 460 distinct values of the join attribute A, and S has 8000 tuples with 70 distinct values of A. Using the…
- Relation R has 7000 tuples with 310 distinct values of the join attribute A, and S has 4400 tuples with 80 distinct values of A. Using the…
- A B-tree node must fit in a 4096-byte block; each key takes 16 bytes and each child pointer 6 bytes. What is the maximum order p (maximum…
- Relation R has 8000 tuples with 50 distinct values of the join attribute A, and S has 3600 tuples with 340 distinct values of A. Using the…
- Relation R has 10000 tuples with 470 distinct values of the join attribute A, and S has 5200 tuples with 100 distinct values of A. Using…
- Relation R has 6000 tuples with 160 distinct values of the join attribute A, and S has 4400 tuples with 390 distinct values of A. Using…