+18 votes
2.1k views

The order of an internal node in a $B+$ tree index is the maximum number of children it can have. Suppose that a child pointer takes $6$ bytes, the search field value takes $14$ bytes, and the block size is $512$ bytes. What is the order of the internal node?

1. $24$
2. $25$
3. $26$
4. $27$

edited | 2.1k views
–1
26 ans

## 2 Answers

+24 votes
Best answer
Answer: C

$14(p-1) + 6p \leq 512$
$20p - 14 \leq 512$
$20p \leq 526$
Therefore, $p = 26$.
by Boss (33.8k points)
edited by
+15 votes

Answer: C

lets assume order of b+ tree is n.

B+ tree internal node has  n-1 keys and n node (child) pointer.

Given : key size: 14 bytes

Child pointer : 6 bytes

we have ,

block size = (n-1) * key size + n * child pointer
512>=(n-1)*14+n*6
512>=14n-14+6n
n=(512+14)/20
n=526/20
n=26.3
n=26
by Active (1k points)
0
block size = (n-1) * key size + n * child pointer

this formula is block size = (n-1) *( key size+data pointer) + n * child pointer

Data pointer is not considered here why?
0

block size = (n-1) *( key size+data pointer) + n * child pointer is not considered

Because above formula is for B tree internal node structure

For B+tree

internal node = cp1 key1 cp2 key2 cp3 ...... cp(n-1)key(n-1)cpn

Answer: