Latest Questions & Answers

Q: SELECT EMP_LNAME, EMP_FNAME, EMP_

SELECT EMP_LNAME, EMP_FNAME, EMP_DOB, YEAR(EMP_DOB) AS YEAR FROM EMPLOYEE WHERE YEAR (EMP_DOB) = 1966; What is the likely data sparsity of the EMP_DOB column?

See Answer

Q: SELECT CUS_CODE, MAX(LINE_UNITS*

SELECT CUS_CODE, MAX(LINE_UNITS*LINE_PRICE) FROM CUSTOMER NATURAL JOIN INVOICE NATURAL JOIN LINE WHERE CUS_AREACODE = ‘615’ GROUP BY CUS_CODE; How would you rewrite the query to ensure that the index...

See Answer

Q: SELECT CUS_CODE, MAX(LINE_UNITS*

SELECT CUS_CODE, MAX(LINE_UNITS*LINE_PRICE) FROM CUSTOMER NATURAL JOIN INVOICE NATURAL JOIN LINE WHERE CUS_AREACODE = ‘615’ GROUP BY CUS_CODE; What indexes would you recommend for the query you wrote...

See Answer

Q: SELECT CUS_CODE, MAX(LINE_UNITS*

SELECT CUS_CODE, MAX(LINE_UNITS*LINE_PRICE) FROM CUSTOMER NATURAL JOIN INVOICE NATURAL JOIN LINE WHERE CUS_AREACODE = ‘615’ GROUP BY CUS_CODE; Assuming that you follow the recommendations you gave in...

See Answer

Q: Using Table 11.4 as an example, create two alternative

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 ar...

See Answer

Q: SELECT CUS_CODE, MAX(LINE_UNITS*

SELECT CUS_CODE, MAX(LINE_UNITS*LINE_PRICE) FROM CUSTOMER NATURAL JOIN INVOICE NATURAL JOIN LINE WHERE CUS_AREACODE = ‘615’ GROUP BY CUS_CODE; Assuming that you generate 15,000 invoices per month, wh...

See Answer

Q: SELECT P_CODE, P_DESCRIPT, P_

SELECT P_CODE, P_DESCRIPT, P_QOH, P_PRICE, V_CODE FROM PRODUCT WHERE P_QOH < P_MIN AND P_MIN = P_REORDER’ AND P_REORDER = 50; ORDER BY P_QOH; What indexes you would recommend? Write the commands to...

See Answer

Q: SELECT P_CODE, P_DESCRIPT, P_

SELECT P_CODE, P_DESCRIPT, P_QOH, P_PRICE, V_CODE FROM PRODUCT WHERE P_QOH < P_MIN AND P_MIN = P_REORDER’ AND P_REORDER = 50; ORDER BY P_QOH; Use the recommendations given in Section 11-5b to rewri...

See Answer

Q: Write a query to produce the total number of hours and charges

Write a query to produce the total number of hours and charges for each of the projects represented in the ASSIGNMENT table. The output is shown in Figure P7.23. Figure P7.23 Total hour and charges by...

See Answer

Q: SELECT P_CODE, P_DESCRIPT, P_

SELECT P_CODE, P_DESCRIPT, P_QOH, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = ‘21344’ ORDER BY P_CODE; How should you rewrite the query to ensure that it uses the index you created in your solution...

See Answer