CS FundamentalsVery hardGATE CS (PYQ pattern) · Product Company SDE
A B-tree node must fit in a 2048-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. 82
- B. 155
- C. 103
- D. 124
Correct answer: C. 103
p·P + (p−1)·K ≤ B → p ≤ (B+K)/(P+K) = (2048+12)/20 = 103 → 103. Ignoring that keys are one fewer than pointers gives 102.
More DBMS and SQL questions
- R(A, B, C, D) has functional dependencies A → B, C → D. What are the candidate key(s) of R?
- R(A, B, C, D) has functional dependencies A → B, C → D, giving candidate key(s) AC. How many superkeys does R have in total?
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A. What are the candidate key(s) of R?
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A, giving candidate key(s) AD, CD, DE. How many superkeys does R have in…
- R(A, B, C, D) has functional dependencies AB → C, C → D, D → A. What are the candidate key(s) of R?
- R(A, B, C, D) has functional dependencies AB → C, C → D, D → A, giving candidate key(s) AB, BC, BD. How many superkeys does R have in total?