Uploaded by Dóugy Themba

ADS302 ASSIGNMENT 2 2020

advertisement
UNIVERSITY OF MPUMALANGA
School of Computing and Mathematical Sciences
Advanced Diploma in Information and Communication Technology
ADS302: Information Systems IIIB
ASSIGNMENT 2: Database Performance Tuning and Query Optimisation
Due date: 31th October 2020
Study the following piece of SQL code and answer the question that follow.
SELECT
FROM
WHERE
ORDER
EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX
EMPLOYEE
EMP_SEX = 'F' AND EMP_AREACODE = '615'
BYEMP_LNAME, EMP_FNAME;
1. What is the likely data sparsity of the EMP_SEX column?
[2]
2. What indexes should you create? Write the required SQL commands.
[8]
3. Using the table below 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.
[30]
Download