Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?
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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

3. What would you do now if you were Mel Fisher?

Answered: 1 week ago

Question

14.3 Explain WHMISlegislation.

Answered: 1 week ago