Skip to main content

ER Diagram Builder

Design database schemas visually. Add entities with typed fields, connect them with relationships, then export as PNG or SQL CREATE TABLE statements — all in your browser.

✓ Add entities with PK / FK / typed fields ✓ Define 1:1, 1:N, M:N relationships ✓ Export PNG + SQL CREATE TABLE ✓ Runs 100% in your browser

Add Entity

Add Relationship

Entities

Export

Drag entities to reposition
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →

Frequently Asked Questions

What is an ER diagram?▼

An Entity-Relationship (ER) diagram is a visual model of a database schema. It shows entities (tables), their attributes (columns), and the relationships between them. ER diagrams are used during database design to clarify structure before writing SQL, communicate schema to teammates, and document existing databases.

What is a primary key vs foreign key?▼

A primary key (PK) uniquely identifies each row in a table — no two rows can share the same PK value, and it cannot be NULL. Common choices are auto-incrementing integers (id) or UUIDs. A foreign key (FK) is a column in one table that references the primary key of another table, establishing a link between the two. For example, a Post table might have a user_id FK pointing to the User table's id PK.

What is cardinality in ER diagrams?▼

Cardinality describes how many instances of one entity relate to instances of another. One-to-one (1:1) means each row in table A corresponds to exactly one row in table B. One-to-many (1:N) means one row in A can relate to many rows in B — the most common type (e.g., one User has many Posts). Many-to-many (M:N) means rows in A can relate to multiple rows in B and vice versa, which requires a junction/pivot table.

When should I use one-to-many vs many-to-many?▼

Use one-to-many when ownership is clear and exclusive — one User owns many Posts, one Order contains many OrderItems. Use many-to-many when both sides can have multiple associations — a Student can enroll in many Courses and a Course can have many Students. Many-to-many relationships require a join table (e.g., enrollments) with foreign keys to both sides, and often additional attributes like enrollment date.

How do I read crow's foot notation?▼

Crow's foot notation uses symbols at each end of a relationship line. A single vertical line (|) means 'exactly one'. A crow's foot (three lines splaying out) means 'many'. A circle means 'zero'. Combined symbols read as: single line + single line = one and only one; crow's foot + single line = one or many; crow's foot + circle = zero or many. Read the symbol at the far end of the line as the maximum, and the symbol closer to the entity as the minimum.