Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Reference for Question 1 Sales Database: Customer(custId, lastName, firstName, a

ID: 3913214 • Letter: R

Question

Reference for Question 1

Sales Database:

Customer(custId, lastName, firstName, address, phone, creditLimit)

Order(orderNumber, date, total, custId)

LineItem(orderNumber, itemNumber, qtyOrdered)

Item(itemNumber, itemName, price)

For the Sales Database in the reference, write the relational algebra expression for the query

Find the lastName of the customer for orderNumber 12345.

Reference for Question 2

Sales Database:

Customer(custId, lastName, firstName, address, phone, creditLimit)

Order(orderNumber, date, total, custId)

LineItem(orderNumber, itemNumber, qtyOrdered)

Item(itemNumber, itemName, price)

For the Sales Database in the reference, write the relational algebra expression for the query "Find the names and quantities of all items on order 12345."

Explanation / Answer

Q1.

SELECT c.lastName

FROM Customer c, Order o

WHERE

c.CustId = o.CustId

AND

o.orderNumber = 12345;

Q2.

SELECT i.itemName, l.qtyOrdered

FROM Item i, LineItem l

WHERE

i.itemNumber = l.itemNumber

AND

l.orderNumber = 12345;

thanks and cheers, please comment if you have any problem rather than giving thumbs down.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote