Entity Relationship Diagrams
Last updated
Last updated
Mermaid's Entity Relationship Diagrams (ERDs) help you visualize database structures and relationships. For analytics engineers, they're essential for documenting data models, table relationships, and database schemas. ERDs show how different entities (tables) in your database relate to each other, including their attributes and the nature of their relationships.
From the Code IDE, Click Apps and Agents from the lefthand panel
Select Mermaid. Paradime will automatically start a new mermaid project
In the terminal that appears, use the arrow keys to select "Entity Relationship Diagrams"
A new entityRelationshipDiagram.mmd
file will be created in your editor with this starter template:
Click the eye icon (👁️) in the top right corner of your Mermaid file to preview the diagram
Edit and update your .mmd
file as needed - the preview will update automatically
Show relationships between entities using crow's foot notation:
||--||
: Exactly one to exactly one
||--o{
: One to many (zero or more)
||--|{
: One to many (one or more)
}o--o{
: Many to many
Solid lines (--): Identifying relationship
Dotted lines (..): Non-identifying relationship
Use clear, descriptive entity names
Show only relevant attributes
Include key relationships
Use consistent naming conventions
Document primary and foreign keys
Group related entities together
For more syntax options and advanced features, visit the official Mermaid documentation