Ask Question

Natalie wants to create a database to collect information about sales transactions. She would like to use the database to look up 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?

+3
Answers (1)
  1. 4 January, 21:02
    0
    Customer Table

    Customer name Customer id

    Product Table

    Product id/number (primary key, auto increment) Product name Product sale price

    Transactions Table

    Transaction Id Customer Id Product id Quantity Price Date

    Explanation:

    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
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Natalie wants to create a database to collect information about sales transactions. She would like to use the database to look up customer ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers