FlowDiagram
Database & ER modelsDBML

Real estate listings schema template

Agencies, agents, properties, listings, photos, viewings, offers and saved searches. This data model has 9 tables and 41 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

  • agencies — 3 columns
  • agents — 4 columns
  • properties — 7 columns
  • listings — 7 columns
  • listing_photos — 4 columns
  • buyers — 3 columns
  • viewings — 4 columns
  • offers — 5 columns
  • saved_searches — 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 agencies {
  id integer [pk]
  name varchar
  licence_no varchar
}

Table agents {
  id integer [pk]
  agency_id integer [ref: > agencies.id]
  name varchar
  phone varchar
}

Table properties {
  id integer [pk]
  address varchar
  bedrooms integer
  bathrooms integer
  floor_area_m2 integer
  lat decimal
  lng decimal
}

Table listings {
  id integer [pk]
  property_id integer [ref: > properties.id]
  agent_id integer [ref: > agents.id]
  kind varchar
  price decimal
  status varchar
  listed_on date
}

Table listing_photos {
  id integer [pk]
  listing_id integer [ref: > listings.id]
  url varchar
  position integer
}

Table buyers {
  id integer [pk]
  name varchar
  email varchar
}

Table viewings {
  id integer [pk]
  listing_id integer [ref: > listings.id]
  buyer_id integer [ref: > buyers.id]
  scheduled_at timestamp
}

Table offers {
  id integer [pk]
  listing_id integer [ref: > listings.id]
  buyer_id integer [ref: > buyers.id]
  amount decimal
  status varchar
}

Table saved_searches {
  id integer [pk]
  buyer_id integer [ref: > buyers.id]
  criteria varchar
  alert_frequency varchar
}

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