Question: onsider an ordered file with 5 0 , 0 0 0 records stored on a disk with block size B = 5 1 2 bytes.

onsider an ordered file with 50,000 records stored on a disk with block size B =512
bytes. File records are of fixed size and are un-spanned, with record length R =50 bytes.
a. How many blocks are needed for the file? (1 mark)
b. How many blocks access is needed if a binary search is performed?
(1)
c. Consider the ordering key field of the file is 8 bytes long, a block pointer, P =
5 bytes long, and a primary index is constructed for the file.
i. What is the size of the index file? (1 mark)
ii. What is the blocking factor for the primary index file? (1 mark)
iii. How many numbers of index entries will be there for the primary index file?
(1 mark)
iv. How many numbers of index block are needed? How many block access will
be performed to search for a record using the index?
(2 mark)
d. Consider non-ordering key field of the file is 10 bytes long and the block
pointer, P =5 bytes long, and a secondary index is constructed on the non-
ordering key field of the file.
i. What is the size of secondary index? (1 mark)
ii. What is blocking factor for secondary index? (1 mark)
iii. How many numbers of index blocks are needed? How many block access will
be performed to search for a record using the secondary index?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!