Ask Question
9 January, 00:09

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. 9 January, 03:11
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers