ER Diagram Tutorial
Design database schemas visually with Mermaid ER diagrams. Learn entity declarations, attribute types, relationships, and cardinality notation.
Entities represent database tables. Declare an entity with its name followed by curly braces containing attributes. Each attribute has a type and a name. The erDiagram keyword starts the diagram.
erDiagram
USER {
int id
string email
string name
timestamp created_at
}Live Editor
Unsaved
More Tutorials
Flowchart Syntax Guide — Nodes, Arrows & Subgraphs
Master Mermaid flowchart syntax with this interactive guide. Learn node shapes, connections, and advanced features.
Sequence Diagram Guide — Messages, Loops & Fragments
Learn to create professional sequence diagrams with Mermaid. Cover participants, messages, and advanced features.
Gantt Chart Tutorial — Tasks, Dependencies & Milestones
Create professional project timelines with Mermaid Gantt charts. Learn tasks, dependencies, and scheduling.
Paste ChatGPT Mermaid Code
Got Mermaid code from ChatGPT? Paste it here to render, edit, and export.