Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 9 . Suppose that we have an ordered file with r = 6 0 0 0 0 record stored on a disk with block

Q9. Suppose that we have an ordered file with r=60000 record stored on a disk with block size, B=512 bytes. File records are of fixed size with record length R=80 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 12 bytes long and a block pointer that is 8 bytes long.
How many block accesses would be needed to search for a record using the primary index?
(c)(8%) Assume that we have constructed a secondary index on a non-ordering key field of the file that is 12 bytes long and a block pointer that is 8 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 multilevel index.
(3) What's the total number of index entries for the second-level index.
(4) How many block accesses would be needed to search for a record using the multilevel index?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

3. Explain the forces that influence how people handle conflict

Answered: 1 week ago