SQL A table Products have: a name (TEXT) a description (TEXT) a unit cost stored in cents (INTEGER) and of course we also add an id column to identify them. Separately, we'd like to track the number of items in stock for each product. To do so we'll have a store and an inventory table. Stores have just an id and a name. Then, our inventory table should combine stores and products, listing how much of each product each store has in stock. a product_id (INTEGER) a store_id (INTEGER) a quantity (INTEGER) in stock Now we can insert some stores, products and inventory into our database. There are 2 stores -- one called NY and one called NJ. There are 2 products we are concerned with. Their names are sneakers, costing $220 (remember this is dollars!) and boots costing $350. Use any description for each that you'd like. NY has 4 sneakers in stock and 3 boots. NJ has 5 sneakers in stock and no boots. Insert the above data into the tables you have created.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

SQL

A table Products have:

  • a name (TEXT)
  • a description (TEXT)
  • a unit cost stored in cents (INTEGER)

and of course we also add an id column to identify them.

Separately, we'd like to track the number of items in stock for each product.

To do so we'll have a store and an inventory table.

Stores have just an id and a name. Then, our inventory table should combine stores and products, listing how much of each product each store has in stock.

  • a product_id (INTEGER)
  • a store_id (INTEGER)
  • a quantity (INTEGER) in stock

Now we can insert some stores, products and inventory into our database.

There are 2 stores -- one called NY and one called NJ. There are 2 products we are concerned with. Their names are sneakers, costing $220 (remember this is dollars!) and boots costing $350. Use any description for each that you'd like. NY has 4 sneakers in stock and 3 boots. NJ has 5 sneakers in stock and no boots.

Insert the above data into the tables you have created.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY