Ask Question
3 July, 02:46

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?

+4
Answers (1)
  1. 3 July, 06:34
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers