Question: In what situation can we use the following rule when optimizing queries? Please also explain why we use this rule. Oc( R*S ) =
In what situation can we use the following rule when optimizing queries? Please also explain why we use this rule. Oc( R*S ) = (0 c1 (R))*(0 c2 (S)) Consider the relations: STUDENT(SNAME, SID, BDATE, ADDRESS, DNUM) COURSE(CNAME, CID, LEVEL, LECTURER) COURSE TAKING(STUDENTID, COURSEID, GRADE) as well as the following SQL query: SELECT SNAME, CNAME, GRADE FROM STUDENT, COURSE TAKING, COURSE WHERE LEVEL 2 AND STUDENTID-SID AND COURSEID-CID AND DNUM=24; a) Draw a canonical query tree for the above SQL query. b) Apply the optimization rules to the above query tree and come up with the most optimized query tree using those rules. State the necessary assumptions for your decision.
Step by Step Solution
There are 3 Steps involved in it
2 c c1 c2 cn in join operation to reduce the size of tables which are participating ... View full answer
Get step-by-step solutions from verified subject matter experts
