Question: Suppose that you have formatted your disk with a block size of 1024 bytes and assume that we have 40,000 STAFF records of fixed length.
Suppose that you have formatted your disk with a block size of 1024 bytes and assume that we have 40,000 STAFF records of fixed length. A block pointer is P=6 bytes long, and a record pointer is Pr = 7 bytes long. Each STAFF record has the following fields: Name (20 bytes), Ssn (9 bytes), Department (9 bytes), Address (40 bytes), Phone (10 bytes), Salary (8 bytes), Position_code (4 bytes), Email (32 bytes), and Job_description (200 bytes). An additional byte is used as a deletion marker. Justify your answers and state any assumptions that you make.
Q1. Suppose that several secondary indexes exist, namely on the nonkey field Department, on the nonkey field Salary, and on the nonkey field Position_code. (Recall from the lecture on indexing that we implement such a secondary index by creating an extra level of indirection.) Describe an efficient way to search for and retrieve records satisfying the complex selection condition (Department=CS AND Salary=100,000 AND Position_code=50).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
