edited by
8,599 views
3 votes
3 votes

In a database file, the search key field is 9 bytes long the block size is 512 bytes, a record pointer is 6 bytes and block pointer is 7 bytes. The largest possible order of a non leaf node in B+ tree implementing this file structure {order defines maximum number of keys present} is ______.

Solution

Asked Order of Internal Node:

Equation :  order *( Block Ptr Size ) + ( order -1) Record Ptr Size < = Block Size

n(7)+ ( n-1) * 6 <= 512

13n <= 518

n <= 39.84

order = 39

Answer given as 31 .
How is this possible . 
Correct me if i am wrong
 


 
 

edited by

4 Answers

Best answer
0 votes
0 votes
My Answer is

Block Size =(n-1)key size +(n-1) record size + n* block pointer size
n is the order of b+ tree
512=(n-1)*9+(n-1) *6+n* 7

512=15n-8

n=520/15 =34.66

floor(n) =34
selected by
7 votes
7 votes

My Answer is 31 and it is correct other one is wrong 

Block Size =(n)*search key+(n+1) block ptr.
n is the order {here order is maximum no of keys present in internal node }of b+ tree
512=(n)*9+(n+1)*7

505=9n+7n

n=505/16

n=31.56
so n=31 (answer)

1 votes
1 votes
you just made a calculation and values mistake

according to B+trees non leaf node:

n(pb)+(n-1)(k)<=disk size

n(7)+(n-1)(9)<=512

16n-9<=512

16n<=512+9

16n<=521

n<=521/16

32.5625 (values after . will going to be removed) so the order of tree will be 32

p=32

now maximum key can be = p-1

i.e. 32-1= 31
1 votes
1 votes
Tree Type= B+ Tree.

Node Type= Non leaf (Internal).

Equation= order* size of block pointer +(order-1)*key pointer<=block size.

n*7+(n-1)*9<=512

7n+9n-9<=512

16n<=521

n<=521/16

n<=32.5625

n=32 Ans

Related questions

0 votes
0 votes
1 answer
2
gauravkumawat asked Jun 13, 2023
880 views
please solve in paper formet Explain the properties of B-Tree Also Construct B+ tree with order P=410,5,30,40,20,17,90,45,93,60,20,50,29
0 votes
0 votes
1 answer
3
Crackcer asked Jan 10, 2022
235 views
1. Suppose there is a B-tree, such that internal node with order 86 and leaf node with order 103.2. A B+ tree with internal order is 171 and leaf node with order 103.In b...
0 votes
0 votes
1 answer
4
Salazar asked Jan 29, 2018
3,931 views
Maximum height of a B+ tree of order m with n key values is (With Derivation), the answer is known Logceil(m/2) NI tried deriving but had some trouble, could someone assi...