Learn ER diagrams
Short, practical guides on designing and reading database schemas — no jargon walls, every concept comes with SQL you can paste straight into the generator. Start with the first one or jump wherever you need.
1. What Is an ER Diagram?
Entity-relationship diagrams explained in plain language: entities, attributes, keys and relationships — with a concrete example.
2. How to Create an ER Diagram
A step-by-step method for designing an ER diagram from scratch, from nouns to foreign keys.
3. SQL to ER Diagram: The Complete Guide
How CREATE TABLE and ALTER TABLE statements map to entities, keys and edges — for PostgreSQL, MySQL and SQLite dumps.
4. Primary Key vs Foreign Key
The two key types every table has (or should), what they guarantee, and how they appear in a diagram.
5. One-to-One Database Relationships
When one row matches exactly one row — 1:1 patterns, and why they are rarer than you think.
6. One-to-Many Relationships (1:N)
The workhorse of relational design: one parent, many children, one foreign key.
7. Many-to-Many Relationships (N:M) and Join Tables
Why students and classes, posts and tags need a third table — and how to design it well.
8. Database Normalization Explained (1NF, 2NF, 3NF)
The three normal forms without the academic jargon: what problem each one solves, with before/after tables.
9. PostgreSQL ER Diagram Guide
Reading a PostgreSQL schema into a diagram: SERIAL, constraints, pg_dump style foreign keys and schema-qualified names.
10. MySQL ER Diagram Guide
MySQL-specific details for accurate diagrams: backticks, AUTO_INCREMENT, TINYINT(1), storage engines and dump files.
11. SQLite ER Diagram Guide
Diagramming SQLite schemas: INTEGER PRIMARY KEY, inline REFERENCES, and the absence of ALTER TABLE constraints.
12. SQL Server ER Diagram Guide
Reading T-SQL into a diagram: bracket identifiers, IDENTITY, schemas, clustered keys, table-level foreign keys and cascade rules.
13. ER Diagram Symbols and Notation Explained
Chen, crow's foot and UML symbols side by side, with the cardinality markers read line by line and a worked example in two notations.
14. How to Read an ER Diagram
A repeatable reading method for ER diagrams, with a six-table e-commerce walkthrough, a practice checklist and the misreadings to avoid.
15. Composite Primary Keys Explained
When two or three columns form the real key, how to declare it in PostgreSQL and MySQL, and the trade-offs against a surrogate id.
16. DBML to ER Diagram: A Practical Guide
DBML syntax from Table and Ref to enums and indexes, how it maps to a relational schema, and how to draw it as an ER diagram.
17. Prisma Schema to ER Diagram
How Prisma models, scalar fields, relations, implicit join tables, and provider settings translate into entities and edges.