What will be the answer for this ,
The maximum number of keys that can be accommodated in each leaf node of the tree is ______.
in non leaf node number of keys = n-1 if suppose this the formula, then
https://gateoverflow.in/3605/gate2006-it_61 even in this question they are asking non-leaf node but we are not using this n-1 here?
@ Prasanna we have done (n-1) here because here in this que no of keys accomodated in each non leaf node is asked.
But here https://gateoverflow.in/3605/gate2006-it_61 order is asked.
@ Sachin Mittal , @ Sushant Gokhale
But then space for a leaf node is:
12*50 + 10*50 + 8 = 1108 which is greater than the block size. Shouldn't we be considering this fact too?
Shouldn't we calculate the max allowed value for both leaf node and internal node and then take the minimum of them?
maximum number of keys:most important
For leaf nodes it is-
n*(K+RP)+BP <= Block size
and for non-leaf nodes it is-
n*BP+(n-1)K <= Block size
this is the correct way to solve
here for non leaf node order is max no of keys/node
means max keys/node=p and (Bp)block_ptr/node=p+1
(p+1)(Bp size)+p(key size)<=block size
yes...for non-leaf node we would consider only block pointer i.e(n+1)....but in the case of leaf node [n keys,n record pointer(data pointer),1 block pointer(sibling pointer)]..???????????