Original_ERD
Tables (12)
Cart
- Cart_ID — INT — Primary key
- Customer_ID — INT — Foreign key → Customer.Customer_ID
- Product_ID — INT — Foreign key → Product.Product_ID
- Added_Date — DATE
- Quantity — INT
Customer
- Customer_ID — INT — Primary key
- Name — VARCHAR(100)
- Phone — VARCHAR(20)
- Address — TEXT
- Preferred_Category — VARCHAR(50)
- Age — INT
- Gender — VARCHAR(20)
Delivery
- Delivery_ID — INT — Primary key
- Order_ID — INT — Foreign key → Order.Order_ID
- Warehouse_ID — INT — Foreign key → Warehouse.Warehouse_ID
- Cluster_ID — INT
- Start_Time — DATETIME
- End_Time — DATETIME
- Delivery_Manager — VARCHAR(100)
Homeplus
- Homeplus_ID — INT — Primary key
- Warehouse_ID — INT — Foreign key → Warehouse.Warehouse_ID
- Name — VARCHAR(100)
- Location — TEXT
Inventory
- Inventory_ID — INT — Primary key
- Product_ID — INT — Foreign key → Product.Product_ID
- Homeplus_ID — INT — Foreign key → Homeplus.Homeplus_ID
- Quantity — INT
- Arrival_Date — DATE
Order
- Order_ID — INT — Primary key
- Customer_ID — INT — Foreign key → Customer.Customer_ID
- Warehouse_ID — INT — Foreign key → Warehouse.Warehouse_ID
- Order_Date — DATE
- Delivery_Date — DATE
- Delivery_Type — VARCHAR(20)
- Is_Curated — BOOLEAN
Order_Detail
- Order_ID — INT — Foreign key → Order.Order_ID
- Product_ID — INT — Foreign key → Product.Product_ID
- Quantity — INT
- Storage_Type — VARCHAR(10)
Product
- Product_ID — INT — Primary key
- Warehouse_ID — INT — Foreign key → Warehouse.Warehouse_ID
- Name — VARCHAR(100)
- Category — VARCHAR(50)
- Price — DECIMAL(10,2)
- Storage_Type — VARCHAR(10)
- Expiration_Date — DATE
Recommendation
- Rec_ID — INT — Primary key
- Customer_ID (Customer_ID2) — INT — Foreign key → Customer.Customer_ID
- Product_ID (Product_ID2) — INT — Foreign key → Product.Product_ID
- Reason — TEXT
- Recommended_Date — DATE
Recommendation_Source
- Source_ID — INT — Primary key
- Rec_ID — INT — Foreign key → Recommendation.Rec_ID
- Source_Type — VARCHAR(20)
Review
- Review_ID — INT — Primary key
- Product_ID — INT — Foreign key → Product.Product_ID
- Customer_ID — INT — Foreign key → Customer.Customer_ID
- Rating — INT
- Comment — TEXT — EX
- Review_Date — DATE
Warehouse
- Warehouse_ID — INT — Primary key
- Location — TEXT
- Operating_Hours — VARCHAR(100)