In a B-Tree, each node represents a disk block. Suppose one block holds 8192 bytes. Each key uses 32 bytes. In a B-tree of order M there are M – 1 keys. Since each branch is on another disk block, we assume a branch is of 4 bytes. The total memory requirement for a non-leaf node is:
(A)
32 M – 32
(B)
36 M – 32
(C)
36 M – 36
(D)
32 M – 36
Answer: (B)
Explanation:
The size of non-leaf node = M(Pb) + (M−1) (key + Pr)
Where,
=> Pb is the Block pointer
=> Pr is the record pointer
=> Given that Pb = 4
=> Size of key (k) =32
=> Size of Pr = ? (Assume it is 0)
=> Total size = M(4)+(M−1) (32+0)
=> 4M + 32M-32
=> 36M−32
Quiz of this Question
Please comment below if you find anything wrong in the above post