Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose that we have a file EMP(SSN. JOB, SAL, NAME, DNO....) with the following characteristics. Blocking Factor Bfre= 10 records/disk block Number of records
Suppose that we have a file EMP(SSN. JOB, SAL, NAME, DNO....) with the following characteristics. Blocking Factor Bfre= 10 records/disk block Number of records re = 80,000 records. Number of file blocks be = 8,000 disk blocks. Record size RE = 400 bytes Suppose that the EMP file has the following indexes: 1. A secondary index on the non-key attribute DNO with number of levels XDNO 2. Assume that there are 400 distinct values of DNO and that the EMP records are uniformly distributed among them. 2. A primary index on the key attribute SSN with number of levels XSSN = 4. (1) (4 points) What is the estimated selectivity of the DNO and the SSN attributes? (2) (8 points) Estimate the cost in number of disk block accesses, for each of the following search operations: (2.a) (4 points) Searching for all records with DNO-50 using the secondary index on DNO. (2.b) (2 points) Searching for the record with SSN-999999999 using the primary index on SSN. (2.c) (2 points) Searching for all records with JOB='Software Engineer' using linear search. (3) (8 points) Suppose that the EMP file described earlier (has be= 8,000 disk blocks) needs to be sorted on the DNO attribute using the sort-merge external sorting method. Assuming that ng 40 main memory buffers are available for doing the external sorting, write formulas for and calculate the following:
Step by Step Solution
★★★★★
3.28 Rating (145 Votes )
There are 3 Steps involved in it
Step: 1
1 The estimated selectivity of the DNO and the SSN attributes is 0025 and 000125 respectively The selectivity of the DNO attribute is calculated by dividing the number of distinct values of DNO 400 by ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started