Question: Section B: Answer the following questions based on the query given SELECT EMP _ _ LNAME, EMP _ _ FNAME, EMP _ _ AREACODE, EMP

Section B: Answer the following questions based on the query given
SELECT EMP__LNAME, EMP__FNAME, EMP__AREACODE, EMP__GENDER
FROM EMPLOYEE
WHERE EMP__GENDER ==F AND EMP__AREACODE =615=615
ORDER BY EMP__LNAME, EMP__FNAME;
1.1. What is the likely data sparsity of the EMP__GENDER column?
2.2. What index would you recommend?
SELECT EMP__LNAME, EMP__FNAME, EMP__DOB, YEAR((EMP__DOB)) AS YEAR
FROM EMPLOYEE
WHERE YEAR((EMP__DOB)=1966)=1966;
3.3. What is the likely data sparsity of the EMP__DOB column?
4.4. What index would you recommend?
SELECT P__CODE, P__PRICE
FROM PRODUCT
WHERE P__PRICE >=(>=(SELECT AVG((P__PRICE)) FROM PRODUCT));
5.5. What is the likely data sparsity of the P__PRICE column?
6.6. Should you create an index? Why or why not?
SELECT P__CODE, SUM((LINE__UNITS))
FROM LINE
GROUP BY P__CODE
HAVING SUM((LINE__UNITS)>()>(SELECT MAX((LINE__UNITS)) FROM LINE));
7.7. What is the likely data sparsity of the LINE__UNITS column?
8.8. Should you create an index? If so,, what would the index column((s)) be and why would you create that index?
9.9. Should you create an index on P__CODE? If so,, write the SQL command to create that index. If not, explain your reasoning.

Step by Step Solution

3.32 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

11 The likely data sparsity of the EMPGENDER column is low This is because there are only two possible values for this column M and F Therefore the da... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!