The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with questions c & d of #1 in the homework. Also if you could give the answer to number 2 part d. That would be helpful as well
CISC437 Spring 2016, Homework 5Due Monday, May 9, at 11:55pm on Sakai.AssignmentThis assignment uses the University database schema; see page 4 for the diagram.1.[60 pts]The tables below show the (abridged) output of MySQLEXPLAINfor three differentSQL queries. For each one,•describe the evaluation plan in words, using phrases like “full table scan”, “scan of pri-mary index”, “scan of secondary index on [fields]”, “primary index lookup”’, “secondaryindex lookup on [fields]”, “block nested-loop join”, “indexed nested-loop join using pri-mary index”, “indexed nested-loop join using secondary index on [fields]”, “externalmergesort”.•write out the relational algebra expression implied by the given evaluation plan.•draw the annotated evaluation tree that matches the evaluation plan (as closely aspossible with the provided information). See Problem 2 for examples of annotatedevaluation trees.(a)EXPLAIN SELECT * FROM student S WHERE S.ID=10+-------------+-------+-------+---------+-------+------+-------+| select_type | table | type| key| ref| rows | Extra |+-------------+-------+-------+---------+-------+------+-------+| SIMPLE| S| const | PRIMARY | const |1 ||+-------------+-------+-------+---------+-------+------+-------+(b)EXPLAIN SELECT S.name, I.name FROM student S JOIN advisor A ON S.ID=A.sIDJOIN instructor I ON I.ID=A.iID WHERE S.deptname=’MATH’+-------------+-------+--------+-----------+--------+------+-------------+| select_type | table | type| key| ref| rows | Extra|+-------------+-------+--------+-----------+--------+------+-------------+| SIMPLE| S| ref| dept_name | const|106 | Using where || SIMPLE| A| eq_ref | PRIMARY| S.ID|1 ||| SIMPLE| I| eq_ref | PRIMARY| A.i_ID |1 ||+-------------+-------+--------+-----------+--------+------+-------------+(c)EXPLAIN SELECT S.name, COUNT(courseid) FROM student S JOIN takes T on S.ID=T.IDJOIN course C ON T.courseid=C.courseid WHERE C.deptname=’CISC’ GROUP BYS.ID+-------------+-------+--------+-----------+-------------+------+----------------+| select_type | table | type| key| ref| rows | Extra|+-------------+-------+--------+-----------+-------------+------+----------------+| SIMPLE| C| ref| dept_name | const|13 | Using filesort || SIMPLE| T| ref| course_id | C.course_id |136 | Using index|| SIMPLE| S| eq_ref | PRIMARY| T.ID|1 ||+-------------+-------+--------+-----------+-------------+------+----------------+(d)EXPLAIN SELECT title, credits FROM Course WHERE courseid LIKE ’CISC%’1
-----------