E-commerce ER Diagram
Customers, orders, line items and products.
Rendering…
Make it your own.
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
PRODUCT ||--o{ ORDER_ITEM : "ordered in"
CUSTOMER {
int id PK
string email
string name
}
ORDER {
int id PK
int customer_id FK
datetime created_at
}
ORDER_ITEM {
int order_id FK
int product_id FK
int qty
}
PRODUCT {
int id PK
string sku
decimal price
}