FlowDiagram
Database & ER modelsDBML

SaaS project schema (DBML) template

If your schema lives in DBML already, it comes straight across. This data model has 7 tables and 33 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

  • users — 4 columns
  • organizations — 4 columns
  • org_members — 4 columns
  • projects — 5 columns
  • tasks — 6 columns
  • comments — 5 columns
  • subscriptions — 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 DBML below and paste it in through ☰ → Import diagram; the finished model exports to SQL DDL or back to DBML.
  5. Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.

DBML 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.

Table users {
  id integer [pk]
  email varchar [unique, not null]
  name varchar
  created_at timestamp
}

Table organizations {
  id integer [pk]
  name varchar [not null]
  plan varchar
  created_at timestamp
}

Table org_members {
  id integer [pk]
  org_id integer [ref: > organizations.id]
  user_id integer [ref: > users.id]
  role varchar
}

Table projects {
  id integer [pk]
  org_id integer [ref: > organizations.id]
  owner_id integer [ref: > users.id]
  name varchar [not null]
  archived boolean
}

Table tasks {
  id integer [pk]
  project_id integer [ref: > projects.id]
  assignee_id integer [ref: > users.id]
  title varchar
  status varchar
  due_date date
}

Table comments {
  id integer [pk]
  task_id integer [ref: > tasks.id]
  author_id integer [ref: > users.id]
  body text
  created_at timestamp
}

Table subscriptions {
  id integer [pk]
  org_id integer [ref: > organizations.id]
  stripe_id varchar
  status varchar
  renews_at timestamp
}

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