1 / 2

14.14

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)

kalin
Download Presentation

14.14

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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.

  2. 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.

More Related