FlowDiagram
Database & ER modelsDBML

Inventory & warehouse schema template

Products, warehouses and stock levels per location. This data model has 8 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

  • products — 4 columns
  • suppliers — 3 columns
  • product_suppliers — 4 columns
  • warehouses — 3 columns
  • bins — 3 columns
  • stock_levels — 5 columns
  • purchase_orders — 5 columns
  • stock_movements — 6 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 products {
  id integer [pk]
  sku varchar [unique, not null]
  name varchar
  unit_cost decimal
}

Table suppliers {
  id integer [pk]
  name varchar
  lead_time_days integer
}

Table product_suppliers {
  id integer [pk]
  product_id integer [ref: > products.id]
  supplier_id integer [ref: > suppliers.id]
  supplier_sku varchar
}

Table warehouses {
  id integer [pk]
  name varchar
  region varchar
}

Table bins {
  id integer [pk]
  warehouse_id integer [ref: > warehouses.id]
  code varchar
}

Table stock_levels {
  id integer [pk]
  product_id integer [ref: > products.id]
  bin_id integer [ref: > bins.id]
  quantity integer
  reorder_point integer
}

Table purchase_orders {
  id integer [pk]
  supplier_id integer [ref: > suppliers.id]
  warehouse_id integer [ref: > warehouses.id]
  status varchar
  ordered_at timestamp
}

Table stock_movements {
  id integer [pk]
  product_id integer [ref: > products.id]
  bin_id integer [ref: > bins.id]
  quantity integer
  reason varchar
  moved_at timestamp
}

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