1,366 views
1 votes
1 votes
1.Following key values are inserted into B+ tree where each node have 2 key values .The sum of keys present    at height 1 (height is at 0) is 8,5,1,7,3,12,9,6 .

2.In a database field 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 max no. of keys present} is

1 Answer

2 votes
2 votes

1st one i'm not getting it..

for 2nd :

given,  search key field=9B

            Record Pointer=6B ,

           Block Pointer=7B

           Block Size=512B

leaf node in B+tree:

             Block_pointer+P*(Search_key_field+Record_Pointer) <=Block_Size  "here P is order"

non-leaf node in B+tree:

              P*Block_pointer +   (P-1)*Search_key_field   <=Block_Size  


So,    P*7 + (P-1)9  <= 512
              16P   <=  521

          P<=32.5 means P=32

Order P=32 So max. number of key present in non leaf node is 32-1=31 (Ans)

edited by

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
3 answers
2
Na462 asked Feb 2, 2019
2,090 views
0 votes
0 votes
0 answers
3
bts1jimin asked Jan 9, 2019
382 views
Can anyone suggest me any useful source from where I can read b+ tree insertion and deletion?
0 votes
0 votes
1 answer
4
Markzuck asked Dec 18, 2018
480 views
By default take ROOT at level 1 or 0?and if asked for B tree then take all the levels but for B+ records only at leaf so only leaf level keys right?