Tables in this data model
- USER — 4 columns
- SELLER_PROFILE — 4 columns
- CATEGORY — 2 columns
- LISTING — 6 columns
- LISTING_IMAGE — 3 columns
- ORDER — 5 columns
- REVIEW — 4 columns
- DISPUTE — 4 columns
- PAYOUT — 4 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
USER ||--o| SELLER_PROFILE : "may have"
SELLER_PROFILE ||--o{ LISTING : publishes
CATEGORY ||--o{ LISTING : contains
LISTING ||--o{ LISTING_IMAGE : shows
USER ||--o{ ORDER : buys
LISTING ||--o{ ORDER : "sold in"
ORDER ||--o| REVIEW : "reviewed by"
ORDER ||--o| DISPUTE : "may raise"
SELLER_PROFILE ||--o{ PAYOUT : receives
USER {
int user_id PK
string email
string name
date joined_on
}
SELLER_PROFILE {
int seller_id PK
int user_id FK
string shop_name
string payout_account
}
CATEGORY {
int category_id PK
string name
}
LISTING {
int listing_id PK
int seller_id FK
int category_id FK
string title
decimal price
string status
}
LISTING_IMAGE {
int image_id PK
int listing_id FK
string url
}
ORDER {
int order_id PK
int buyer_id FK
int listing_id FK
decimal amount
string status
}
REVIEW {
int review_id PK
int order_id FK
int rating
string body
}
DISPUTE {
int dispute_id PK
int order_id FK
string reason
string outcome
}
PAYOUT {
int payout_id PK
int seller_id FK
decimal amount
date paid_on
}
Related: Database schema diagram tool · Mermaid editor · All database & er models templates · All 521 templates