Question: Write the relational algebra (as well as the SQL query) for the specification below using the relations also defined below: Retrieve the names of customers

Write the relational algebra (as well as the SQL query) for the specification below using the relations also defined below:

  1. Retrieve the names of customers and the part name of orders with a quantity greater than 10. PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP_CODES(Zip, City, State) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty)

Where Qoh stands for quantity on hand and Olevel stands for (re)order Level. The P, C, E and O single-letter prefixes for attributes refer to the parts, customers, employees and orders relations, respectively. The other attribute names are self-explanatory

  1. Using a drawing tool such as draw.io, draw two initial relational algebra query trees for each of the queries above.
  2. Transform each of the initial query trees created above into a more efficient form (use the heuristic rules basically apply steps a-e in the query optimization example that we did in class)

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 General Management Questions!