search
Log In
3 votes
267 views
suppose that in a file organization record size(R)=150 bytes , block size (B)=512 bytes. there are totally 30000 records. the data field on which indexing is done is 9 bytes and block pointer size is 7 bytes how many block access will be needed to access a data item in case of single level primary indexing?
in CO and Architecture
edited by
267 views
0
is it 10?
0
The answer should be 10.
0
yes I too got 10 but in the answer key they have given 9 , just wanted to confirm.

Thanks :)
0

The answer will be 9 when we have access the Block only. If you want to access the data of that particular Block then the answer will be 10.

==> Here asking for the Data items. So, the answer will be 10.

2 Answers

4 votes
 
Best answer

10 is right .


selected by
0
thanks...concept got clear
0
Thanks brother for insight into the concept.

Because of your help I got conceptual clarity
0
i dont understand why we use take ceiling not floor in binary search
2 votes
No. of blocks in disk = (30000x150)/512 = 8789.

In primary indexing , one entry for each block is there , so number of blocks in index = (8789 x 16)/512 = 274.65 = 275.

Now , we can apply binary search for primary indexing .

ceil(log(275)) = 9

In worst case , it'll take 9 block transfers to locate the exact block and 1 extra transfer for getting that block.

Therefore total number of transfers = 10.

Related questions

0 votes
0 answers
1
0 votes
0 answers
2
2 votes
1 answer
3
354 views
Consider the following statement below: $A)$ A clustered index may be either sparse or dense. $B)$ Every $B^{+}$ tree index is dense. Which of the above statement is true? Is clustering Index can be dense. Dense means non-ordering field, but clustering field should be ordering field right??
asked May 13, 2019 in Databases srestha 354 views
2 votes
1 answer
4
486 views
In a database file structure, the search key field is 9 bytes long, the block size is 1024 bytes, a record pointer is 7 bytes and a block pointer is 6 bytes. The largest possible order of a leaf node in a B+ tree implementing this file structure is
asked Jan 26, 2018 in Databases sumit chakraborty 486 views
...