in Databases edited by
692 views
2 votes
2 votes

Here the indexing is done on ordered field so which to use Dense or Sparse because both can be done here ?

in Databases edited by
by
692 views

4 Comments

Bro, everything is correct in your answer....

but you have to see what his question is ?

he is not asking no.of blocks..... he is asking no.of records...
0
0
Ohk so it says that the number of index record in first level :- Since we do indexing corresponding to every Block so therefore answer is number of Blocks THANKFUL TO U,SUCH A SILLY MISTAKE
1
1
no of index record in the first level is 43? i m getting 43 as ans...

No. of blocks in disk = (30000x100)/1024 = 2930

In primary indexing , one entry for each block is there , so number of blocks in index = (2930 x 15)/1024 = 42.9=43

so total no of index records in first level 43...

am i correct?
0
0

1 Answer

0 votes
0 votes
So if Sparse Indexing is Used the Answer Should Be :-

Record Size = 100B

Block Size is = 1024B

Number of records in a block = 1024/100 = 10

Total blocks required = 30000/10 = 3000.

Now index Content = (Attribute,Block Pointer) = 9 + 6 = 15B

In 1024 Size Block = 1024/15 = 68.

So number of Blocks in 1st level = 3000/68 = 45.