Write the following queries in relational algebra and their corresponding query
ID: 3676525 • Letter: W
Question
Write the following queries in relational algebra and their corresponding query trees. a. List the order numbers and their corresponding customer numbers for January 2013 b. List the names of customers residing in Seattle, WA. c. List all customers first and last names. d. Write a natural join between Employee and OrderTbl and specify which attribute should be used. e. List all customer first and last names and their order number from the cities of Denver or Seattle f. List the email of the employee who was in charge of order no= 05511365 g. List the first and last name of customers whose balance is over $200. h. For each employee, list the order numbers and the customer numbers for which they are responsible.Explanation / Answer
1.select order_number,cust_number from from OrderTbl where month="january" and year='2013';
2.select cust_name from custtbl where city name="seattle"or "wa";
3.select lastname,firstname from employee;
4.select custno,empname from orderTbl,employee where ordertbl.custno=employee.custno;
5.select lastname,firstname,orderno from customer where city="denver" or "seattle";
6.select email from employee where orderno='05511365';
7.select lastname,firstname from customer where balance>$200;
8.select empname,orderno,custno,reponsibility from employee,ordertbl where ordertbl.orderno=customer.orderno;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.