Redirected
1,847 views
9 votes
9 votes
The difference between the minimum levels of B tree index  required for 7000 keys  and order of B tree node (P) is 12 ( Assume order P is max possible child pointers per B tree node ) and the min levels of B+ tree index required for 7000 keys and order of B+ tree node (P) is 12 (Assume P is max pointer possible to stage in B+ tree node)

1 Answer

11 votes
11 votes
In B-trees min number of levels =

 

At first level we can have 11 keys ;

 

At second level we can have 12*11;

 

At 3rd  level we can have 12*12*11            total = 11 + 12*11 + 12*12*11 =  1727 <7000 keys

 

at  fourth level we can have  = 12*12*12*11  total > 7000 so minimum number of levels =  4;

 

Now in B+ trees since all keys are present in leaves ;

 

so i will start from leaves ;

 

at first level = 7000 / 11 = 637( P is number of block pointers so number of keys = 11)

 

at second level = ceil (637/12 ) = 54 ; (since p =12 so we can have 12 block  pointers and keys = 11 )

 

at 3rd level = ceil (54/12) = 5

 

at fourth level 5/12 = 1;

so  four levels

 

difference = 0 ;

Related questions

0 votes
0 votes
1 answer
1
Crackcer asked Jan 10, 2022
237 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...
1 votes
1 votes
1 answer
2
Balaji Jegan asked Dec 12, 2018
644 views
Please help me fill the remaining entries of the Tablep=orderSl.No: B TreeB+ TreeMinimumMaximumMinimumMaximumKeysNode PointersKeysNode PointersKeysNode PointersKeysNode P...
0 votes
0 votes
1 answer
3
Vishnathan asked Aug 24, 2018
8,183 views
0 votes
0 votes
0 answers
4
A_i_$_h asked Sep 9, 2017
231 views
what is the maximum and minimum number of nodes in a B and B+ tree when height is given?