ER Diagram Generator
Generate entity-relationship diagrams from SQL schema
Write each table name, then add columns as
- name type. Add relationships such as A ||--o{ B. Mermaid source
erDiagram
USERS {
string id PK
string email
string role_id FK
}
ROLES {
string id PK
string name
}
USERS }|..|| ROLES : relates
Relationship syntax
- ||--o{ → Zero or more (one-to-many)
- ||--|{ → One or more
- ||--|| → Exactly one (one-to-one)