Natalie wants to create a database to collect information about sales transactions. She would like to use the database to look u
p customer names and sales prices if they return a product She would like to sort the items in the database by product number. What fields should she have in her database?
Natalie wants to fetch following information from database
Look up customer name and sale price
Sort items in db by product number
To lookup customer name and sale price perform a join on Transactions table and Customer table.Assuming database is build in mysql the query to fetch required results would be
select transction.productId,transaction.customerid,customer.customername from transactions join customer ON
customer.customerid=transcation.customerid
where productid="user provided product id of returned product"
For sorting products by number set produc number in product table a auto increment primary key