edited by
120 views
1 votes
1 votes
Consider a $B^{+}$- tree in which the search key is $24\;\text{bytes}$ long, block size is $2048 \;\text{bytes}$, recorder pointer is $20\;\text{bytes}$ long and the block pointer is $16\;\text{bytes}$ long. If the maximum number of keys that can be accommodated in each leaf node is $’a’$ and that in each internal node (non-leaf) is $'b',$ the value of $b - a$ is ________
edited by

1 Answer

Best answer
3 votes
3 votes
$\textbf{For Non-leaf node(Internal node):}$

$(n+1)(P_{b}) + n.k \leq \text{Block Size}$

Where, $n = $ maximum number of stored keys, $P_{b} = $ Block pointer size

$\implies (n+1)16 + n(24) \leq 2048$

$\implies 16n + 24n +16 \leq 2048$

$\implies 40n \leq 2032$

$\implies n \leq 50.8$

$\therefore$ Maximum number of keys in an internal node (non-leaf) $b = 50.$

$\textbf{For leaf node:}$

$m(k + P_{r}) + P_{b} \leq \text{Block Size}$

Where, $m = $ number of keys, $P_{b} = $ Block pointer size, $P_{r} = $ Record (or) Data pointer size (Unlike in a $B-$ tree, in a $B^+-$tree only the leaf nodes have record pointers).

$\implies m(24 + 20) + 16 \leq 2048$

$\implies 44m \leq 2032$

$\implies m \leq 46.18$

$\therefore$ Maximum number of keys in a leaf node, $a = 46.$

Now, the value of $ b-a = 50 - 46 = 4.$
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
gatecse asked Oct 15, 2020
111 views
Consider the following schedules$$\textbf{First Schedule}$$$$ \begin{array}{|c|c|c|} \hline T_{1} & T_{2} & T_{3} \\\hline R(A) & & \\ & & R(A) \\ W(A) & & \\ & R(A) &...
2 votes
2 votes
1 answer
3
gatecse asked Oct 15, 2020
213 views
Consider the following schedule$$\textbf{Schedule}$$$$\begin{array}{|c|c|c|c|c|c|} \hline T_{1} & T_{2} & T_{3} & T_{4} \\\hline R(x) & & & \\ & R(x) & & \\ & & R(x) & \...
1 votes
1 votes
1 answer
4
gatecse asked Oct 15, 2020
130 views
The numbers of relations required when the below ER diagram is converted to Relational model is ________