Question: This is our final schema for the E - commerce Purchasing System: 1 . customers - customer _ id ( Primary Key ) - name

This is our final schema for the E-commerce Purchasing System:
1. customers
- customer_id (Primary Key)
- name (VARCHAR2, Not Null)
- email (VARCHAR2, Unique, Not Null)
2. customer_details
- detail_id (Primary Key)
- customer_id (Foreign Key, References customers.customer_id, Not Null)
- address (VVARCHAR2, Not Null)
- phone_number (VARCHAR2, Not Null)
3. products
- product_id (Primary Key)
- name (VARCHAR2, Not Null)
- category (VARCHAR2, Not Null)
- price (DECIMAL(10,2), Not Null)
4. orders
- order_id (Primary Key)
- customer_id (Foreign Key, References customers.customer_id, Not Null)
- order_date (DATE, Not Null)
- total_amount (DECIMAL(10,2), Not Null)- The total cost of the order.
\(\cdot \) order_status (ENUM('Pending', 'Shipped', 'Delivered'), Not Null)
5. order_items
- order_item_id (Primary Key)
- order_id (Foreign Key, References orders.order_id, Not Null)
- product_id (Foreign Key, References products.product_id, Not Null)
- quantity (INT, Not Null)- Number of units ordered for this product.
6. payments
- payment_id (Primary Key)
- order_id (Foreign Key, References orders.order_id, Not Null)
- payment_method (ENUM('CreditCard', 'PayPal'), Not Null)
- payment_status (ENUM('Completed', 'Pending', 'Failed'), Not Null)
- payment_date (DATE, Not Null) Figure 1: E-commerce Purchasing System Scheme
LAB 2:
- Build the tables in Oracle Live SQL with your account according to the schema.
- Build the relations among the tables.
- Delete, modify or update the tables.
- Delete, modify or update the constraints.
- Insert sample data into tables.
This is our final schema for the E - commerce

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 Programming Questions!