Question: Draw the initial query tree for each of these queries, then show how the query tree is optimized (one rule at a time) by the

Draw the initial query tree for each of these queries, then show how the query tree is optimized (one rule at a time) by the algorithm outlined in chapter 19 and write the SQL query for the final optimized query tree.

Q1: List the lastnames of pair of authors who co-authored at least one book.

SELECT a1.AuthorLast, a2.AuthorLast FROM Author a1, Wrote w1, Author a2, Wrote w2 WHERE a1.AuthorNum = w1.AuthorNum and a2.AuthorNum = w2.AuthorNum and w1.BookCode = w2.BookCode and a1.AuthorNum < a2.AuthorNum;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!