FlowDiagram
Database & ER modelsMermaid

Order schema (ER diagram) template

Crow's-foot relationships and typed columns. This data model has 8 tables and 37 columns, joined by 7 relationships. FlowDiagram draws it as an entity-relationship diagram with crow's-foot notation.

Open in the editor →
  • Free — no account, no trial, no watermark
  • Fully editable shapes and connectors, not a screenshot
  • Export PNG, SVG or PDF, or share it as a link
  • Private: the diagram never leaves your browser

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

  1. Click Open in the editor. The ER diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
  2. Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
  3. 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.
  4. Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
  5. 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