1,006 views
0 votes
0 votes

1 Answer

Best answer
2 votes
2 votes

#records= 10000   block size=1024 B record size=100 B search key=9B pointer=7B.

index blocking factor : block size/(key size+pointer)= 1024/16 =64

table blocking factor : floor(block size/record size)= 10

1) &3) for dense index we will have one entry in index table for each record so #block entries = 10000/64 = 157 (level 1)

at level 2 #block entries = (ceil(157/64))= 3

at level 3 #block entries = ceil(3/64) =1

so we will have 157 block in level 1 and total 3 levels.

2) & 4) for sparse index , number of blocks in main table to be matched with index table = 10000/table block factor =10000/10 =1000

number of blocks needed when these are matched with index entries =(ceil)(1000/64) = 16 at level 1.

number of #block entries at level 2 = ceil(16/64) = 1

so we wil have 16 block in level 1 and total 2 levels.

 

selected by

Related questions

0 votes
0 votes
1 answer
1
srestha asked Sep 16, 2017
621 views
Block size 1000 BSearch key 12 BPointer size 8BWhat is max records of DB1) For Dense index B+ tree of 2 level2) For Sparse index B+ tree of 2 levelHow ans will differ , P...
0 votes
0 votes
1 answer
2
focus _GATE asked Jun 30, 2015
489 views
Is there any condition in which we can say that dense index is sparse index?
0 votes
0 votes
1 answer
3
AnilGoudar asked Jun 10, 2017
525 views
Is it possible to have an Index file which is both dense index and sparse Index?
0 votes
0 votes
0 answers
4
Deepalitrapti asked Aug 15, 2018
330 views