ERData modelSimple
E-commerce data model
Entities for customers, orders, line items, products, and payments in an e-commerce app.
What this diagram shows
Step 01
Customer to order
A customer places many orders — the core one-to-many of any store.
Step 02
Order composition
Each order is made up of line items that reference catalog products.
Step 03
Payment binding
Every order pairs with exactly one payment record.
About er diagrams
Entity-relationship diagrams sketch the shape of a data model: tables, their fields, and how they reference each other. They help when planning schemas or explaining a database at a glance.
This template is written in Mermaid — plain text you can edit, version in git, and regenerate the image from any time.
View Mermaid sourcePlain-text diagram syntax — copy or edit directly.
diagram.mmd
1erDiagram2 CUSTOMER ||--o{ ORDER : places3 ORDER ||--|{ LINE_ITEM : contains4 LINE_ITEM }o--|| PRODUCT : refers5 ORDER ||--|| PAYMENT : paid_by67 CUSTOMER {8 uuid id9 text email10 text name11 }12 ORDER {13 uuid id14 timestamp placed_at15 text status16 }17 LINE_ITEM {18 uuid id19 int quantity20 money price21 }22 PRODUCT {23 uuid id24 text name25 money price26 }27 PAYMENT {28 uuid id29 money amount30 text method31 }Related
Related templates
More templates that cover similar workflows.