Question: Index: A disk has block size of 1024 bytes. A file has 30,000 EMPLOYEE records of fixed length. Each record has the following fields: NAME
Index: A disk has block size of 1024 bytes. A file has 30,000 EMPLOYEE records of fixed length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes, SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number) 1. Calculate the record size in bytes. How many records fit onto a disk block? 2. How many blocks are required to store the entire file? 3. Suppose the file is sorted and you want to construct a dense primary B+ tree index. One way to accomplish this is to scan the file, inserting each record using the B+ tree insertion procedure. Explain what are the performance and storage utilization problems with this approach. Explain how bulk-loading improves upon this approach 4. Assume that you have built a dense B+-tree index on SSN, and the B+-tree's leaf nodes contain record ids pointing to data records in data file. Assume points (e.g. record ids) are 10-byte long. Assume also that you built the tree by using bulk loading so that the nodes at each level were filled up as much as possible. a. How many levels does the resulting tree have? b. For each level of the tree, how many nodes are at that level
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
