Mermaid template
ER Diagram
Entities, attributes, and cardinality for database schema design.
Source
Open in editorerDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
PRODUCT ||--o{ ORDER_ITEM : "ordered in"
CUSTOMER {
string id PK
string email UK
string name
}
ORDER {
string id PK
string customer_id FK
date placed_at
}
Entity-relationship diagrams sketch a database schema: entities become tables, and the crow's-foot notation between them encodes cardinality — ||--o{ reads as one-to-many.
Attribute blocks list columns with types, and keys can be marked PK, FK, or UK.