Question: Consider a disk with block size B = 5 1 2 bytes, a block pointer P = 6 bytes, and a record pointer PR =
Consider a disk with block size B bytes, a block pointer P bytes, and a record pointer PR bytes. A file contains EMPLOYEE records, with the following fields:
Name bytes
Ssn bytes
Departmentcode bytes
Address bytes
Phone bytes
Birthdate bytes
Sex byte
Jobcode bytes
Salary bytes, real number
Deletion marker byte Tasks:
a Calculate the record size R in bytes.
b Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.
c Suppose the file is ordered by the key field Ssn and you want to construct a primary index on Ssn
i Calculate the index blocking factor bfri also the index fanout fo
ii Calculate the number of firstlevel index entries and the number of firstlevel index blocks.
iii Determine the number of levels needed for a multilevel index.
iv Calculate the total number of blocks required by the multilevel index.
v Calculate the number of block accesses needed to search for and retrieve a record using the primary index.
d Repeat part c for a secondary index on Ssn assuming the file is not ordered by Ssn Compare the results with the primary index.
e Construct a secondary index on Departmentcode using option of Section with an extra level of indirection that stores record pointers. Assume there are distinct values of Departmentcode and the records are evenly distributed.
i Calculate the index blocking factor bfri.
ii Calculate the number of blocks needed by the level of indirection.
iii Calculate the number of firstlevel index entries and blocks.
iv Determine the number of levels needed for a multilevel index.
v Calculate the total number of blocks required by the multilevel index and level of indirection.
vi Estimate the number of block accesses to retrieve all records with a specific Departmentcode.
f Construct a clustering index on Departmentcode assuming the file is ordered by this field. Calculate the blocking factor, firstlevel index blocks, levels, total blocks, and block accesses required to retrieve all records for a specific Departmentcode.
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
