FlowDiagram
Database & ER modelsMermaid

Ride-hailing platform ER diagram template

Riders, drivers, vehicles, trips, fares, payments, ratings and surge zones in Mermaid ER form. This data model has 9 tables and 37 columns, joined by 9 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

  • RIDER — 3 columns
  • DRIVER — 4 columns
  • VEHICLE — 4 columns
  • TRIP — 7 columns
  • FARE — 5 columns
  • PAYMENT — 4 columns
  • RATING — 4 columns
  • ZONE — 2 columns
  • SURGE_PERIOD — 4 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
  RIDER ||--o{ TRIP : requests
  DRIVER ||--o{ TRIP : drives
  DRIVER ||--|{ VEHICLE : registers
  VEHICLE ||--o{ TRIP : "used for"
  TRIP ||--|| FARE : "priced as"
  TRIP ||--o{ PAYMENT : "paid by"
  TRIP ||--o{ RATING : receives
  ZONE ||--o{ SURGE_PERIOD : has
  ZONE ||--o{ TRIP : "starts in"
  RIDER {
    int rider_id PK
    string name
    string phone
  }
  DRIVER {
    int driver_id PK
    string name
    string licence_no
    string status
  }
  VEHICLE {
    int vehicle_id PK
    int driver_id FK
    string plate
    string category
  }
  TRIP {
    int trip_id PK
    int rider_id FK
    int driver_id FK
    int vehicle_id FK
    int zone_id FK
    string status
    datetime requested_at
  }
  FARE {
    int fare_id PK
    int trip_id FK
    decimal base
    decimal surge_multiplier
    decimal total
  }
  PAYMENT {
    int payment_id PK
    int trip_id FK
    string method
    decimal amount
  }
  RATING {
    int rating_id PK
    int trip_id FK
    string by_role
    int stars
  }
  ZONE {
    int zone_id PK
    string name
  }
  SURGE_PERIOD {
    int surge_id PK
    int zone_id FK
    decimal multiplier
    datetime starts_at
  }

Related: Database schema diagram tool · Mermaid editor · All database & er models templates · All 521 templates