Answered You can hire a professional tutor to get the answer.

QUESTION

Assume a table Emp(ssn, name, salary) of employee records, where ssn is the primary key. The total size of the table is 34,560MB. The table (i.

Assume a table Emp(ssn, name, salary) of employee records, where ssn is the primary key. The total size of the table is 34,560MB. The table (i.e., the records of the table) is stored in a heap file in chunks of 2KB pages (all full of records) on a single disk drive. In all questions below that involve indices, assume that the number of leaf pages for B-trees and the number of buckets for hash indices are the same with the number of pages required to store the table in the heap.

  1. Q1: select name from Emp where ssn=1000
  2. We are about to run the above query to find the name of the employee with the given ssn of 1000. In a worst-case scenario, how long this operation will take? Express your answer in both, number of disk accesses (I/O) and in hours. The disk drive has the following characteristics: average seek time is 8 msecs, average rotational delay is 1 msec, and average transfer rate is 1 msec per 2KB block so, the total time to locate and transfer a disk block of data is 10 msecs.
  3. Assume that in addition to storing the table as described above, we also have available a B-tree built for this table on Emp.ssn - this is the search key of the B-tree. A data entry in the tree is a pair (ssn, RID of a data record in the heap). What is the approximate cost (in number of disk accesses) of executing the query Q1 if we use the B-tree index? 
  4. Now assume that we have a hash index on Emp.ssn. A data entry in the hash is a pair (ssn, RID of a data record in the heap). What is the approximate cost (in number of disk accesses) of executing the query Q1 if we use the hash index?
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question