Question: Suppose that we have an ordered file with r = 6 0 0 0 0 record stored on a disk with block size, B =

Suppose that we have an ordered file with r =60000 record stored on a disk with block size,
B =1024 bytes. File records are of fixed size with record length R =100 bytes.
(6%)
(1)What's the blocking factor for the file? What's the number of blocks needed for file?
(2)How many block accesses would be needed to do a binary search for ordering field on the data file?
(3)How many block accesses in average would be needed to do a linear search for non-ordering field on the data file?
(b)(2%) Assume that we have constructed a primary index for the file that the ordering key field of the file is 15 bytes long and a block pointer that is 10 bytes long.
How many block accesses would be needed to search for a record using the primary index?
(c)(6%) Assume that we have constructed a secondary index on a non-ordering key field of the file that is 15 bytes long and a block pointer that is 10 bytes long.
(1) What's the total number of index entries for the file? What's the total number of blocks neededfor the index?
(2) How many block accesses would be needed to search for a record using the secondary index?
The above index, which is constructed based on a non-ordering key field, is called a first level index. Assume that a second-level index has been constructed based on the first-level index to create a multi-level index.
(3)(2%) What's the total number of index entries for the second-level index.
(4)(2%) How many block accesses would be needed to search for a record using the multilevel index?Q9. Suppose that we have an ordered file with r=60000 record stored on a disk with block size,
B=1024 bytes. File records are of fixed size with record length R=100 bytes.
(a)(6%)
(1)What's the blocking factor for the file? What's the number of blocks needed for file?
(2)How many block accesses would be needed to do a binary search for ordering field on the data file?
(3)How many block accesses in average would be needed to do a linear search for non-ordering field on
the data file?
(b)(2%) Assume that we have constructed a primary index for the file that the ordering key field of the file
is 15 bytes long and a block pointer that is 10 bytes long.
How many block accesses would be needed to search for a record using the primary index?
(c)(6%) Assume that we have constructed a secondary index on a non-ordering key field of the file that
is 15 bytes long and a block pointer that is 10 bytes long.
(1) What's the total number of index entries for the file? What's the total number of blocks needed
for the index?
(2) How many block accesses would be needed to search for a record using the secondary index?
The above index, which is constructed based on a non-ordering key field, is called a first level index.
Assume that a second-level index has been constructed based on the first-level index to create a
multi-level index.
(3)(2%) What's the total number of index entries for the second-level index.
(4)(2%) How many block accesses would be needed to search for a record using the multilevel
index?
 Suppose that we have an ordered file with r =60000 record

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 Databases Questions!