A worked example, rendered from real sample data. Sign in to run the tool on your own input.
users
employees
projects{
"diagram": "erDiagram\n ORGANIZATION ||--o{ DEPARTMENT : has\n DEPARTMENT ||--o{ EMPLOYEE : employs\n EMPLOYEE ||--o{ PROJECT : works_on\n EMPLOYEE ||--o{ SKILL : has\n\n ORGANIZATION {\n int id PK\n string name UK\n string headquarters\n }\n DEPARTMENT {\n int id PK\n int org_id FK\n string name\n string budget\n }\n EMPLOYEE {\n int id PK\n int dept_id FK\n string name\n string email UK\n decimal salary\n }\n PROJECT {\n int id PK\n string title\n string status\n date start_date\n }\n SKILL {\n int id PK\n string name\n string level\n }",
"format": "mermaid",
"title": "Entity Relationship Diagram",
"entities": [
"Organization",
"Department",
"Employee",
"Project",
"Skill"
],
"relationships": [
"Organization-Department",
"Department-Employee",
"Employee-Project",
"Employee-Skill"
]
}
Generate ER diagrams with entities, attributes, and relationship cardinality. Part of the DevTools Surf developer suite. Browse more tools in the Diagrams & Workflows collection.