1 TCO 7 Consider the ERD below What tables will be needed to

1. (TCO 7) Consider the ERD below. What tables will be needed to create a report showing the firstname and lastname of customers who have placed an order for any product with keyboard in the description?

A.     customer, product only
B.      customer, order, product only
C.      customer, orderline only
D.     customer, order, orderline, product

Customer PK customerID. ast name firstname order PK orderiD order date FK1 customer ID orderline PK,FK1 roductdD rderlD quantity Product PK productID description price

Solution

Solution: D. customer, order, orderLine, product

Explanation:

Query to create a report showing the firstname and lastname of customers who have placed an order for any product with keyboard in the description:

To accomplish the above task keenly observe the ERD,

using productID we can get the description from Product table

Using the Combination of productID orderID we can get the corresponding order from OrderLine table

Using OrderID we can get the id of customer place from order table.

Finally we can find the first and last namses using the Customer table.

Query Looks like this:

select firstname ,lastname where customerID=(

select customerID from order where orderID =(

select orderID from OrderLine where productID in(

select productID from Productwhere description = \'keyboard\')))

1. (TCO 7) Consider the ERD below. What tables will be needed to create a report showing the firstname and lastname of customers who have placed an order for an

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site