ErdForgeData modeling workspace · v1.0.4

ERD diagram guide

ERD diagram guide for database design examples and tools

Learn how ERD diagrams document tables, columns, keys, and relationships, then use practical database design examples and ErdForge's online ERD workspace to turn requirements into a data model.

Definition

What is an ERD diagram?

ERD stands for Entity Relationship Diagram. It shows the data objects a service manages and the relationships between them, helping developers decide which tables are needed and how records reference each other.

Elements

Core ERD elements

Entities

Business objects that usually become database tables, such as users, orders, and products.

Attributes

Column-level data including names, types, required flags, defaults, and uniqueness.

Identifiers

Primary keys and foreign keys that make rows and relationships reliable.

Relationships

The direction and cardinality between entities, such as one-to-many or optional one-to-one.

Workflow

ERD design workflow

Extract entity candidates from requirements

List nouns the service must store, then remove duplicates or overly broad candidates.

Define attributes and keys

Add columns such as id, status, and created_at, then mark primary keys, foreign keys, uniqueness, and nullability.

Connect relationships and cardinality

Represent rules such as whether one user can have many orders or whether each order must have a user.

Review normalization and query patterns

Check repeated columns, many-to-many relationships, derived values, and the flows your API will query often.

Keep review history with the team

Treat the ERD as a living design document that changes with the product.

Example

Commerce order ERD example

A small commerce domain can start with users, orders, order_items, and products. Instead of connecting orders and products directly as many-to-many, use an order_items table to preserve quantity and price-at-order data.

ErdForge

Using ErdForge

ErdForge gives you a canvas for ERD editing, team sharing, Oracle/PostgreSQL/MySQL/MariaDB/SQLite type options, JSON and SQL export, and MCP integration for AI-assisted diagram drafts.