Tables in this data model
- CUSTOMER — 4 columns
- ADDRESS — 5 columns
- ORDER — 6 columns
- ORDER_ITEM — 5 columns
- PRODUCT — 5 columns
- CATEGORY — 2 columns
- PAYMENT — 5 columns
- SHIPMENT — 5 columns
How to use this ER diagram template
- Click Open in the editor. The ER diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
- Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
- Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
- Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
- Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.
Mermaid source
The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.
erDiagram
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ ADDRESS : has
ORDER ||--|{ ORDER_ITEM : contains
PRODUCT ||--o{ ORDER_ITEM : "appears in"
CATEGORY ||--o{ PRODUCT : groups
ORDER ||--o{ PAYMENT : "paid by"
ORDER ||--o| SHIPMENT : "shipped as"
CUSTOMER {
int customer_id PK
string email
string full_name
date signed_up_on
}
ADDRESS {
int address_id PK
int customer_id FK
string line1
string city
string country
}
ORDER {
int order_id PK
int customer_id FK
int shipping_address_id FK
date placed_on
string status
decimal total_amount
}
ORDER_ITEM {
int order_item_id PK
int order_id FK
int product_id FK
int quantity
decimal unit_price
}
PRODUCT {
int product_id PK
int category_id FK
string sku
string name
decimal list_price
}
CATEGORY {
int category_id PK
string name
}
PAYMENT {
int payment_id PK
int order_id FK
string method
decimal amount
string status
}
SHIPMENT {
int shipment_id PK
int order_id FK
string carrier
string tracking_no
date shipped_on
}
Related: Database schema diagram tool · Mermaid editor · All database & er models templates · All 521 templates