ERD Best Practices and Database Design

The Schemity blog: database design for software engineers, from crow's foot notation and context views to reverse engineering a live database and keeping your ERD in Git.

Column Comments in PostgreSQL and MySQL: How to Document Columns Without a Migration
Column Comments in PostgreSQL and MySQL: How to Document Columns Without a Migration
A column comment costs a full migration cycle, and on MySQL it means restating the entire column definition. Schemity keeps field descriptio...
Circular Foreign Keys: Why the First Row Cannot Be Inserted
Circular Foreign Keys: Why the First Row Cannot Be Inserted
Two tables that reference each other with NOT NULL foreign keys accept no rows at all. Schemity's schema lint finds the cycle in the ERD off...
PostgreSQL timestamp vs timestamptz: Which to Use and How to Find the Wrong Ones
PostgreSQL timestamp vs timestamptz: Which to Use and How to Find the Wrong Ones
timestamptz records an instant, timestamp records a reading on a clock, and your ORM probably chose the second one. Schemity's timestamp-not...
Export a Database Data Dictionary: HTML, Markdown and Excel from Your ERD
Export a Database Data Dictionary: HTML, Markdown and Excel from Your ERD
Schemity exports the diagram as a data dictionary in HTML, Markdown and Excel, covering every column, constraint and relationship, and close...
Schema Linting vs Migration Linting: Which Database Problems Each One Can See
Schema Linting vs Migration Linting: Which Database Problems Each One Can See
Migration linters read the statement you are about to run. Schemity's schema lint reads the model you already have - seventeen rules checked...
Unique Constraints on Nullable Columns: What They Enforce and What They Exempt
Unique Constraints on Nullable Columns: What They Enforce and What They Exempt
A unique constraint covers only the rows where every column in the key has a value. Sometimes that exemption is the design and sometimes it...
Postgres Array Column vs Junction Table: What Each One Does to Your ERD
Postgres Array Column vs Junction Table: What Each One Does to Your ERD
An array of IDs is a many-to-many relationship with no foreign key and no line on the diagram. Schemity renders PostgreSQL array types as re...
DrawSQL Alternative: An Offline Desktop ERD Tool With No Table Limits
DrawSQL Alternative: An Offline Desktop ERD Tool With No Table Limits
DrawSQL has no live database connection and caps tables on every plan. Schemity is the offline DrawSQL alternative that reverse engineers yo...
You Cannot Tell Which of Your ERD Files Are Under Version Control
You Cannot Tell Which of Your ERD Files Are Under Version Control
Schemity marks every workspace whose folder sits inside a Git repository with a branch icon, so which database diagrams are version controll...
Why Schemity Has No Zoom: Fuzzy Search and a Minimap Instead
Why Schemity Has No Zoom: Fuzzy Search and a Minimap Instead
Schemity deliberately has no zoom control. Every zoom changes the geography of the diagram and costs you the mental work of re-finding where...
Database Views in Your ERD: Read-Only Entities, Not Fake Tables
Database Views in Your ERD: Read-Only Entities, Not Fake Tables
Most ERD tools ignore database views or draw them as editable tables. Schemity renders views and materialized views as read-only entities wi...
SSMS Database Diagrams: Your ERD Is Trapped Inside the Database It Documents
SSMS Database Diagrams: Your ERD Is Trapped Inside the Database It Documents
SSMS stores database diagrams as binary rows in sysdiagrams - no file, no Git, no export. Schemity reverse engineers SQL Server into a local...
Supabase Schema Diagram: Get an ERD You Can Keep, Not a Dashboard View
Supabase Schema Diagram: Get an ERD You Can Keep, Not a Dashboard View
Supabase Studio's Schema Visualizer shows one schema at a time and keeps your layout in one browser's localStorage. Schemity connects to the...
ON DELETE CASCADE Is Invisible in Your ERD and in Your Database Logs
ON DELETE CASCADE Is Invisible in Your ERD and in Your Database Logs
Referential actions decide which rows a single DELETE destroys, yet most ERD tools never store them and MySQL never logs them. Schemity draw...
Postgres Enum vs Check Constraint vs Lookup Table for a Status Column
Postgres Enum vs Check Constraint vs Lookup Table for a Status Column
Native Postgres enums make every value-set change a locking migration, and no diagram tool shows what the allowed values are. Schemity rende...
Lucidchart ERD Alternative: A Desktop ERD Tool That Connects to Your Database
Lucidchart ERD Alternative: A Desktop ERD Tool That Connects to Your Database
Lucidchart has no live database connection - schema arrives as a hand-exported CSV. Schemity is the Lucidchart ERD alternative that reverse...
Comparing Staging and Production Database Schemas Side by Side
Comparing Staging and Production Database Schemas Side by Side
Staging and production schemas drift apart, and a text diff of two SQL dumps won't show you where. Schemity opens both environments as diagr...
Roles and Permissions Table Design: Why Permissions Are Not Tenant-Scoped
Roles and Permissions Table Design: Why Permissions Are Not Tenant-Scoped
Roles carry a tenant_id and permissions do not, and that one asymmetry decides the whole design. How the roles, permissions, and junction ta...
Many-to-Many Relationships and Junction Tables: How to Model N:N in an ERD
Many-to-Many Relationships and Junction Tables: How to Model N:N in an ERD
A relational database cannot store a many-to-many relationship directly - it needs a junction table holding one foreign key per parent, whic...
Why ERD Tools Draw Your 1:1 Relationship as 1:N
Why ERD Tools Draw Your 1:1 Relationship as 1:N
ERD tools misdraw 1:1 relationships as 1:N because they ignore unique constraints. Schemity derives crow's foot cardinality from the foreign...
Your DDD Context Map Is Already in Your Foreign Keys
Your DDD Context Map Is Already in Your Foreign Keys
Schemity's Context Map derives a DDD context map from the schema itself: each context view becomes a node, and every dependency arrow is bac...
Why Your ERD Export Turns Blurry - and How SVG Export Fixes It
Why Your ERD Export Turns Blurry - and How SVG Export Fixes It
Raster ERD exports blur, crop, or balloon in size. Schemity, an offline desktop ERD tool, exports crisp SVG or Mermaid text of the whole dia...
The Data Dictionary Should Live in the ERD, Not in a Spreadsheet
The Data Dictionary Should Live in the ERD, Not in a Spreadsheet
Schemity attaches markdown descriptions to entities, legends, and context views, so what your tables mean lives inside the diagram - not in...
DbSchema Alternative: The Lightweight Desktop ERD Tool
DbSchema Alternative: The Lightweight Desktop ERD Tool
A DbSchema alternative at less than half the price: Schemity is a lightweight desktop ERD tool with JSON-in-Git storage and BYOK AI, not a f...
You Don't Need a Diagram of All 800 Tables
You Don't Need a Diagram of All 800 Tables
Inherited a huge undocumented database? A full-schema poster is unreadable by design. Reverse engineer it into a desktop ERD tool, then carv...
ERD-First Database Design: One 60-Entity Schema, Sketch to Production
ERD-First Database Design: One 60-Entity Schema, Sketch to Production
A real workflow for a 60-entity schema: design the whole model up front, implement it context by context with AI-generated code, then let re...
Keeping Your ERD Updated Shouldn't Be a Second Job
Keeping Your ERD Updated Shouldn't Be a Second Job
ERDs go stale the moment the schema moves on, and re-importing destroys your layout. Schemity re-syncs the diagram from the live database ev...
Switching ERD Tools Shouldn't Mean Starting Over
Switching ERD Tools Shouldn't Mean Starting Over
Most diagram tools only let your schema out as a picture or bare DDL, so years of work stay trapped. A desktop ERD tool with DBML and SQL im...
ERD Tool Free-Tier Limits: 15-Table and 60-Object Caps Distort Models
ERD Tool Free-Tier Limits: 15-Table and 60-Object Caps Distort Models
Free-tier ERD tools cap you at 15 tables or 60 objects and paywall private diagrams, so the pricing page ends up shaping your data model. A...
How to Keep ERD Relationship Lines Readable: Hops, Waypoints, Colors
How to Keep ERD Relationship Lines Readable: Hops, Waypoints, Colors
When relationship lines cross, most schema visualizers make you guess which one you were following. Schemity - a desktop ERD tool with line...
AI ERD Design With Ollama: Schema Help That Never Leaves Your Machine
AI ERD Design With Ollama: Schema Help That Never Leaves Your Machine
Add Ollama to Schemity and get private AI database design with zero cloud calls - an offline AI ERD tool for teams where cloud AI is banned...
Supabase Studio and pgAdmin Won't Give You a Schema Diagram You Own
Supabase Studio and pgAdmin Won't Give You a Schema Diagram You Own
Supabase Studio draws your schema but keeps the layout in one browser's localStorage; pgAdmin's exports follow the UI theme. A desktop ERD t...
Finding a Column Shouldn't Take a SQL Query
Finding a Column Shouldn't Take a SQL Query
Millions of developers query information_schema just to find which table holds a column. A desktop ERD tool with fuzzy search across entity...
Your ERD Shouldn't Be Able to Just Disappear
Your ERD Shouldn't Be Able to Just Disappear
Cloud diagram tools can lose your ERD - one day it is just gone from the list, and recovery means a support ticket or a paid tier. A local E...
ChartDB Alternative: The Offline Desktop ERD Tool
ChartDB Alternative: The Offline Desktop ERD Tool
A ChartDB alternative that runs offline: Schemity is a desktop ERD tool with BYOK AI, diagrams stored as JSON in Git, and a one-time purchas...
Entity Templates: How to Stop Schema Naming and Field-Order Drift
Entity Templates: How to Stop Schema Naming and Field-Order Drift
Schema drift starts at the blank entity. How entity templates and convention-aware field placement in a desktop ERD tool keep every table co...
Documenting Your Production Database Shouldn't Feel Dangerous
Documenting Your Production Database Shouldn't Feel Dangerous
How to document a production database schema without fear: a desktop ERD tool that connects through SSH tunnels, keeps passwords in your OS...
Your Client's Schema Doesn't Belong in Your Cloud Account
Your Client's Schema Doesn't Belong in Your Cloud Account
An ERD tool for consultants and client work: one workspace per client, stored as local folders you can hand over or delete when the engageme...
Stop Hand-Translating Between SQL and Your ERD
Stop Hand-Translating Between SQL and Your ERD
Generate an ERD from a SQL dump, import CREATE TABLE statements in one paste, and turn diagram edits into a reviewed migration SQL diff - al...
AI Help With Your Database Design, Without the Cloud
AI Help With Your Database Design, Without the Cloud
A BYOK ERD tool changes the deal: private AI database design with your own OpenAI, Claude, Gemini, or DeepSeek key. AI ERD without cloud acc...
You Cannot Judge Coupling and Cohesion From the Same View
You Cannot Judge Coupling and Cohesion From the Same View
Low coupling and high cohesion are two questions at two scales. See why the main ERD perspective and a database context view answer differen...
Database Context Views Should Show the Relationships They Hide
Database Context Views Should Show the Relationships They Hide
Database context views and ERD perspectives give focus by removing noise - but they also take. Here is what a sub-diagram in your ERD tool o...
Crow's Foot Notation in ER Diagrams: Every Symbol Mapped to SQL
Crow's Foot Notation in ER Diagrams: Every Symbol Mapped to SQL
A bar means one, a crow's foot means many, a circle means zero is allowed. This guide maps every crow's foot symbol in an ER diagram to the...
Multi-Tenant RBAC Schema Design: 7 Tables, Step by Step (With ERD)
Multi-Tenant RBAC Schema Design: 7 Tables, Step by Step (With ERD)
The complete multi-tenant RBAC schema is seven tables: tenants, users, members, roles, permissions, and two junction tables. Here is the ful...
dbdiagram.io Alternative: Offline Desktop ERD Tool, One-Time Purchase
dbdiagram.io Alternative: Offline Desktop ERD Tool, One-Time Purchase
dbdiagram.io's free tier is 10 public diagrams, then $14/month. Schemity is the offline dbdiagram.io alternative: private by default, diagra...
A Lightweight Desktop ERD Tool With Custom Waypoints and Color-Coded Relationships
A Lightweight Desktop ERD Tool With Custom Waypoints and Color-Coded Relationships
Most database design tools treat schema work as a chore. What if a lightweight desktop ERD tool got out of the way - with ERD custom waypoin...
ERD tool built for software engineers who touch a database
ERD tool built for software engineers who touch a database
Import a workspace from anywhere on your machine and treat your ERD like infrastructure - version-controlled in Git, reviewed in PRs, and ke...
ERD Check Constraints: Show Business Rules in Your Diagram
ERD Check Constraints: Show Business Rules in Your Diagram
ERD check constraints support turns your schema into living documentation. See how domain-driven design database schema patterns surface val...
Keyboard-First ERD Design: Build a Schema Without Touching the Mouse
Keyboard-First ERD Design: Build a Schema Without Touching the Mouse
The best ideas happen fast. Most ERD tools make you slow down. A lightweight desktop ERD tool built for the speed of thought - keyboard-firs...
The ERD that lives in your Git repo
The ERD that lives in your Git repo
Stop exporting PNGs to Confluence. A Git-native ERD tool stores your database diagrams as JSON files you can version control, review in PRs,...