Find the solutions to Problems 1 and 2 based on the following query:
SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX
FROM EMPLOYEE
WHERE EMP_SEX = ‘F’ AND EMP_AREACODE = ‘615’
ORDER BY EMP_LNAME, EMP_FNAME;
1. What is the likely data sparsity of the EMP_SEX column?
2. What indexes should you create? Write the required SQL commands.
3. Using Table 11.4 as an example, create two alternative access plans. Use the following assumptions:
a. There are 8,000 employees.
b. There are 4,150 female employees.
c. There are 370 employees in area code 615.
d. There are 190 female employees in area code 615.