prac1
Tables (4)
Customers (customers)
- Customer ID (customer_id) — INT — Primary key — NOT NULL
- Customer Name (customer_name) — VARCHAR(10)
- ID (id) — VARCHAR(30)
- Password (pw) — VARCHAR(30)
- Phone (phone) — VARCHAR(20)
- Main Address (main_addr) — VARCHAR(10)
- Sub Address (sub_addr) — VARCHAR(30)
Order Items (order_items)
- Item ID (item_id) — INT — Primary key — NOT NULL
- Product ID (product_id) — INT — Foreign key → Products.Product ID — NOT NULL
- Order ID (order_id) — INT — Foreign key → Orders.Order ID — NOT NULL
- Customer ID (customer_id) — INT — Foreign key → Orders.Customer ID — NOT NULL
- Quantity (quantity) — INT
Orders (orders)
- Order ID (order_id) — INT — Primary key — NOT NULL
- Customer ID (customer_id) — INT — Foreign key → Customers.Customer ID — NOT NULL
- Order Date (order_date) — Datetime
Products (products)
- Product ID (product_id) — INT — Primary key — NOT NULL
- Product Name (product_name) — VARCHAR(30)
- Price (price) — INT
- Stock (stock) — INT
- Category (category) — VARCHAR(30)