ER diagram maker
MEMBERSTables with their columns and keys, joined by relations with crow's foot ends: one, many, and none or one.
Diagram
Diagram
Full stop and comma move between shapes, arrows move the selected one, Enter writes its text, C starts a connection, Delete removes. Capital R, D, O, B, T, N, F or S adds a shape. K folds, P shows what leads to the shape, Command or Control with F searches.
Pick a shape above and press here, or open a template.
Source, live both ways
Source, live both ways
What Mermaid can hold
What Mermaid can hold
What Mermaid cannot hold is kept in the project. Editing the code changes only what the code says.
Found a bug or missing something? Write to us
How it works
Modelling a database
Every entity is a table. Write its name in the first line and one column in each of the next: a type, a name, and PK, FK or UK for a key.
Read a relation from both ends: a customer places none or many orders, an order belongs to exactly one customer. The end near a table says how many rows of that table take part.
Two tables that are many on both sides need a third one between them. In the example the order line joins orders with products.
Help
FAQ
What do the crow's foot symbols mean in Mermaid?
|| is exactly one, |o or o| zero or one, }| or |{ one or more, and }o or o{ zero or more. In the tool they are the ends One, None or one, Many and None or many, and a new connection starts with One and ends with None or many.
What is the difference between a solid and a dashed relation?
A solid line, -- in Mermaid, is an identifying relation: the key of the child table includes the key of the parent, as an order line is known by its order. A dashed line, .., is non-identifying. Line: Dashed under Colours and lines switches between them.
Why is a column missing from the Mermaid code?
Only rows that read as a type, a name and at most one key, PK, FK or UK, are written; the others are counted under Rows in the panel beside the code. Comments in quotes after a column of pasted code are dropped when it is read.