DeVry MIS 562 iLab 5 in MySQL
Please use the template below to provide your answers. Be sure to add your SQL Query and executed output from your input SQL Query. Any answers without executed output WILL NOT earn any credit.
Using the student schema from Week 4, provide answers to the following questions.
Question SQL statement or Answer
1) Generate statistics for the student, enrollment, grade, and zipcode tables (15 pts)
Use the following.
Name: Jennifer Lucas
Status: Online ⬤
Classes Taken: 3878
- ANALYZE TABLE XXXXXX;
- SHOW TABLE STATUS FROM MIS562_XXXX WHERE NAME IN (‘STUDENT’,’ENROLLMENT’,’GRADE’,’ZIPCODE’);
2) Write a query that performs a join, a subquery, a correlated subquery using the student, enrollment, grade, and zipcode tables. Execute each query to show that it produces the same results. (15 pts)
3) Produce an auto trace output using Explain for each query. (10 pts)
4) Analyze the results and state which performs best and why. Write an analysis of what operations are being performed for each query. Determine which query is the most efficient and explain why (10 pts)