Question: Question 1 . ( 5 0 marks ) Suppose that you have formatted your disk with a block size of 4 0 9 6 bytes

Question 1.(50 marks)
Suppose that you have formatted your disk with a block size of 4096 bytes and assume
that we have 10,000 SMARTPHONE records of fixed length. A block pointer is 10
bytes long (P=10), and a record pointer is 6 bytes long (Pr=6. Each SMARTPHONE
record has the following fields: Brand (16 bytes), Model (20 bytes), Color (10 bytes),
Size (60 bytes), Weight (10 bytes), Price (8 bytes), Year (4 bytes), and Remarks (160
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? [10 marks]
(b) Calculate the index blocking factor bfri. [5 marks]
(c) Assume that the primary index is a single-level index. Calculate the number of
index entries and the number of index blocks. [10 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 single-level
index in subquestion (c)?[10 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? [10 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? [5 marks]
Question 1 . ( 5 0 marks ) Suppose that you have

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