Question: Online Store Database: Design a relational database schema for an online store that sells products. Include tables for customers, orders, products, and inventory. 1 .

Online Store Database:
Design a relational database schema for an online store that sells products. Include tables for customers, orders, products, and inventory.
1.1 Tables
These tables form the foundation for managing bookstore-related data.
Feel free to adjust the column names, data types, and constraints based on your specific requirements.
Feel free to expand the schema by adding more tables related to inventory, transactions, or other relevant aspects!
1.1.1 Books Table:
Stores information about books available in the store.
Includes columns for book ID, title, author ID, genre, and ISBN.
CREATE TABLE Books ( book_id INT PRIMARY KEY, title VARCHAR(255), author_id INT, publisher_id INT, price DECIMAL(10,2),); stock_quantity INT
1.1.2 Authors Table:
Contains details about authors.
Columns include author ID, first name, last name, and birth year.
CREATE TABLE Authors ( author_id INT PRIMARY KEY, ); author_name VARCHAR(100)
1.1.3 Publishers Table:
Stores information about book publishers.
Columns include publisher ID, publisher name, and location.
CREATE TABLE Publishers ( publisher_id INT PRIMARY KEY, publisher_name VARCHAR(100), location VARCHAR(100)
;
CIS 182- W24
Team Project - Suggested Projects
Page 1 of 8
1.1.4 Customers Table:
Records customer details.
Includes columns for customer ID, first name, last name, email, and phone number.
CREATE TABLE Customers (
customer_id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(100),
phone_number VARCHAR (20),
address VARCHAR(255)
;
1.1.5 Orders Table:
Tracks customer orders.
Columns include order ID, customer ID, order date, and total amount.
CREATE TABLE orders ( order_id INT PRIMARY KEY, customer_id INT, order_date DATE, total_amount DECIMAL (10,2),
;
FOREIN KEY (customer_id) REFERENCES customers(customer_id)
1.2 Requirements
Implement CRUD (Create, Read, Update, Delete) operations for managing customer data, product details, and order history.
Create complex queries to retrieve information such as top-selling products, customer order summaries, and inventory levels.
 Online Store Database: Design a relational database schema for an online

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!