Ask Your Question
0

What is the SQL schema structure for a ShoppingCart that includes tables named Spanner and Book?

asked 2021-11-08 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-04-26 14:00:00 +0000

ladyg gravatar image

Here is an example SQL schema structure for a shopping cart that includes tables named Spanner and Book:

CREATE TABLE Spanner ( id INT NOT NULL, name VARCHAR(255) NOT NULL, price DECIMAL(10,2) NOT NULL, PRIMARY KEY (id) );

CREATE TABLE Book ( id INT NOT NULL, title VARCHAR(255) NOT NULL, author VARCHAR(255) NOT NULL, price DECIMAL(10,2) NOT NULL, PRIMARY KEY (id) );

A typical implementation of a shopping cart would include additional tables such as Customer, Order, and Orderline, which would store information about the customer, their orders, and the items in their orders.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-11-08 11:00:00 +0000

Seen: 7 times

Last updated: Apr 26 '22