Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing A Practical Approach

Authors: Robyn Moroney

1st Canadian Edition

978-1118472972, 1118472977, 978-1742165943

More Books

Students also viewed these Programming questions