FlowDiagram
Database & ER modelsDBML

Video streaming subscriptions schema (DBML) template

Accounts, profiles, plans, subscriptions, titles, episodes and watch history for a Netflix-style streaming service. This data model has 8 tables and 38 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

  • plans — 5 columns
  • accounts — 4 columns
  • subscriptions — 5 columns
  • profiles — 4 columns
  • titles — 5 columns
  • episodes — 5 columns
  • watch_history — 6 columns
  • watchlist_items — 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 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 plans {
  id integer [pk]
  name varchar
  max_streams integer
  max_resolution varchar
  monthly_price decimal
}

Table accounts {
  id integer [pk]
  email varchar [unique]
  country char
  created_at timestamp
}

Table subscriptions {
  id integer [pk]
  account_id integer [ref: > accounts.id]
  plan_id integer [ref: > plans.id]
  status varchar
  renews_on date
}

Table profiles {
  id integer [pk]
  account_id integer [ref: > accounts.id]
  name varchar
  is_kids boolean
}

Table titles {
  id integer [pk]
  name varchar
  type varchar
  maturity_rating varchar
  release_year integer
}

Table episodes {
  id integer [pk]
  title_id integer [ref: > titles.id]
  season integer
  number integer
  duration_minutes integer
}

Table watch_history {
  id integer [pk]
  profile_id integer [ref: > profiles.id]
  title_id integer [ref: > titles.id]
  episode_id integer [ref: > episodes.id]
  position_seconds integer
  watched_at timestamp
}

Table watchlist_items {
  id integer [pk]
  profile_id integer [ref: > profiles.id]
  title_id integer [ref: > titles.id]
  added_at timestamp
}

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