The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+17 votes
1.8k 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$
asked in Databases by Veteran (59.6k points)
edited by | 1.8k views
–2
26 ans

3 Answers

+21 votes
Best answer
Answer: C

$14(p-1) + 6p \leq 512$
$20p - 14 \leq 512$
$20p \leq 526$
Therefore, $p = 26$.
answered by Boss (34k points)
edited by
+14 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
answered by Active (1.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?
–10 votes
ans d)
answered by Loyal (5.2k points)
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

40,856 questions
47,523 answers
145,901 comments
62,280 users