Customers
- customer_id (Primary Key)
- name
Products
- product_id (Primary Key)
- name
- price
Orders
- order_id (Primary Key)
- customer_id (Foreign Key → Customers)
- order_date
OrderItems
- order_id (Foreign Key → Orders)
- product_id (Foreign Key → Products)
- qty
- unit_price
customers
{
"customer_id": 1,
"name": "Alice Smith",
"email": "alicesmith@gmail.com"
}products
{
"product_id": 1,
"name": "Laptop",
"price": 999.99
}orders
{
"order_id": 1,
"customer_id": 1,
"order_date": "2023-10-01",
"items": [
{
"product_id": 1,
"name": "Laptop",
"qty": 1,
"unit_price": 999.99
}
]
}