20 likes | 160 Views
14.14. Consider a disk with B= 512 bytes. P=6 bytes r=30,000 R=114 bytes bfr =4 b=7500 Suppose the file is ordered by the key field EmployeeID and we want to construct an index on EmpID. Calculate the following: What type of index would we create. Index blocking factor (bfri)
E N D
14.14 Consider a disk with B= 512 bytes. P=6 bytes r=30,000 R=114 bytes bfr =4 b=7500 • Suppose the file is ordered by the key field EmployeeID and we want to construct an index on EmpID. Calculate the following: • What type of index would we create. • Index blocking factor (bfri) • The number of first level index entries. • The number of first level blocks. • The number of levels needed if we turn it into a multi-level index. • The total number of blocks required by the multi-level index. • The number of block accesses needed to search for and retrieve a record from the file given its EmpID value, using the index.
Consider a disk with B= 512 bytes. • P=6 bytes r=30,000 R=114 bytes bfr =4 b=7500 • Suppose the file is not ordered by the non-key field DeptCode and we want to construct an index on DeptCode. We want to construct a Secondary index using a level of indirection. Assume there are 1000 distinct values of department code, and that the records are evenly distributed among these values. Answer the following: • Index blocking factor (bfri) • The number of first level index entries. • The number of first level blocks. • Number of blocks needed for the level of indirection. • The number of levels needed if we turn it into a multi-level index. • The total number of blocks required by the multi-level index. • The number of block accesses needed to search for and retrieve a record from the file given its EmpID value, using the index.