The Gateway to Computer Science Excellence
+8 votes
3.2k views

Calculate the order of leaf ($P_{leaf}$) and non leaf (P) nodes of a $B^{+}$ tree based on the information given below.

Search key field = $12$ field

Record pointer = $10$ bytes

Block pointer = $8$ bytes

Block size = $1$KB

  1. $P_{leaf}$ = 51 & p = 46
  2. $P_{leaf}$ = 47 & p = 52
  3. $P_{leaf}$ = 46 & p = 51
  4. $P_{leaf}$ = 52 & p = 47
in Databases by Boss (30.8k points) | 3.2k views

2 Answers

+16 votes
Best answer

option c is the ans

by Boss (11.1k points)
selected by
0

correctyes

0
what is the meaning of the word Order .. ?
Is it Number of key values in a node .. ?
0

Isn't it supposed to be (n-1)(searchKey + RecordPointer) + BlkPtr <= BlockSize instead of n(searchKey + RecordPointer) + BlkPtr <= BlockSize? Here n is order of leaf node.

+5 votes

Answer c)

Pleaf

1*BP + (Pleaf )*(key+Recrd Pointer) <= Block size

Pleaf<=46.18

Pnonleaf

P*Block Pointer +(P-1)*(Key) <= Block Size

Pnonleaf <=51.8

by Veteran (119k points)
+1
Ans should be c)

You made mistake in order of leaf node of b+ ...

For leaf node order is pleaf(key+record pointer)+ block pointer (next)<= block size
0
tnks .ans c) rt?
+1
o yes , i swiped :P
0
Could you let me know why we take block pointer into consideration in leaf node??

Won't the pointer that points to the leaf node be in int's parent what is the need to include it.

Is the block pointer that is included the one pointing to the sibling node to the right of the current node??
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
50,737 questions
57,297 answers
198,265 comments
104,978 users