Question: Question 1 . ( 5 0 marks ) Suppose that you have formatted your disk with a block size of 4 0 9 6 bytes
Question marks
Suppose that you have formatted your disk with a block size of bytes and assume
that we have SMARTPHONE records of fixed length. A block pointer is
bytes long and a record pointer is bytes long Each SMARTPHONE
record has the following fields: Brand bytes Model bytes Color bytes
Size bytes Weight bytes Price bytes Year bytes and Remarks
bytes The file is ordered by the key field Brand, and we want to construct a primary
index on Brand.
Justify your answers and state any assumptions that you make!
a Calculate the blocking factor bfr and the number of file blocks needed to store the
SMARTPHONE records. Assume that records are stored unspanned. How much
space remains unused per block? marks
b Calculate the index blocking factor bfri. marks
c Assume that the primary index is a singlelevel index. Calculate the number of
index entries and the number of index blocks. marks
d Suppose we are going to retrieve a record based on the value of Brand. What is
the number of block accesses needed to search for a record without using the
primary index? And what is the number of block accesses using the singlelevel
index in subquestion c marks
e Now, suppose that we want to make the primary index a multilevel index. How
many levels are needed and what is the total number of blocks required by the
multilevel index? marks
f Consider the multilevel index from subquestion e What is the number of block
accesses needed to search for and retrieve a record from the file, given its Brand
value? marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
