The Gateway to Computer Science Excellence
+1 vote

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

in Databases by Loyal (7k points)
edited by | 85 views
Please Explain it. In ace they say that the number of index record in 1st level index = total number of blocks in 30000 employee record which is 3000. But why ?? Which indexing they have done dense or sparse Cant understand :(
ordered on field x

and we want index on field x =====> sparse

otherwise dense
Indexing is done at ssn . Which is ordered and key so sparse indexing is used
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 = 64.

So number of Blocks in 1st level = 3000/64 = 47.

But then why is answer 3000 ???
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...
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
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?

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,370 answers
105,274 users