2,645 views
8 votes
8 votes
DB file consist 1250 records.Block can hold either 3 records or(10 keys,11 pointers)

How many min index blocks and min level of index required for sparse B+ tree Index for this DB.

3 Answers

Best answer
11 votes
11 votes

ceil(1250/3)=417 blocks are required

so for each block one 417 pointers are required so number of blocks is ceil(417/11)=38  ---------1st level

again these 38 blocks are to be indexed so 38 pointers so number of blocks is ceil(38/11)=4-----2nd level

again 4 pointers so ceil(4/11)=1-----3rd level

min index blocks=38+4+1=43

min levels are 3

selected by
1 votes
1 votes
root                 min  max

Block pointer   2       11

keys                1       10

----------------------------------------------

non root           min   max

block pointer     6        11

keys                5         10

-----------------------------------------------

levels    #of nodes      #of B.p            #of keys

1            1                  2                        1

2            2                2*6                     2*5

3             12              12*6                   12*5

4              72             72*6                    72*5

5              432           432*6                  432*5(2160)

in B+tree total no of nodes =no of leaf nodes

given no of records is 1252<2160

so no of levels required is 5.

each block can hold 3 records so total no of block=1250/3

                                                                           =417
0 votes
0 votes
Ans will be 4 bcaz

1250/3= 417 blocks

1st level 417/5= 83

2nd laval 83/6 =13

3rd 13/6=2

block at 4 th level =1

Related questions

1 votes
1 votes
0 answers
1
dushyantsingh asked Jul 8, 2017
315 views
a clusture index offer much better performance than unclusture index for range queries ,explain ?
1 votes
1 votes
1 answer
2
Vasu_gate2017 asked Nov 5, 2016
419 views
With respect to B+ tree index method select the correct statementa)records are physically stored in primary key orderb)B+ tree uses a hashing algorithmsc)the index tree m...
1 votes
1 votes
1 answer
3
Vasu_gate2017 asked Nov 5, 2016
260 views
A data dictionary doesn't provide iformation abouta)where data is locatedb)the siz of disk storagec)who owns the datad) how data is used
0 votes
0 votes
0 answers
4