ERD Diagrams

Create Entity-Relationship Diagrams (ERDs) to model database structures and data relationships.

What is an ERD?

An Entity-Relationship Diagram visualizes:

  • Entities: Database tables or objects
  • Attributes: Properties of entities
  • Relationships: How entities connect to each other
  • Cardinality: The nature of relationships (one-to-one, one-to-many, etc.)

Creating an ERD

Adding Entities

  1. Choose the Table tool in the toolbar and click on the canvas to create a table for each entity
  2. Use the first row as the entity name and the following rows for attributes

See Tables for editing rows, columns, and cell text.

Each entity typically contains:

  • Entity name (header)
  • Primary key field(s)
  • Other attributes

Adding Relationships

  1. Select the Connector Tool
  2. Draw a line between related entities
  3. Set appropriate arrowheads for cardinality

Crow's Foot Notation

Crow's foot notation is the most common ERD style. It uses symbols at connector ends to show cardinality.

Cardinality Symbols

SymbolMeaning
`` (single line)
○ (circle)Zero (optional)
< or > (crow's foot)Many

Common Relationships

NotationStartEndMeaning
One-to-One```
One-to-Many``<
Many-to-Many<>Multiple relate to multiple
Zero-or-One`○``
Zero-or-Many○<``

Applying Crow's Foot Arrowheads

  1. Select a connector between entities
  2. In the Inspector's Style tab, go to the Connector section
  3. Pick Start Arrowhead and End Arrowhead from the Built-in Arrowheads list. The ERD arrowheads are:
ArrowheadTypical meaning
Bar BarExactly one (‖)
Bar BallZero or one (○|)
Crows FeetMany
Crow BarOne or many (|<)
Crow BallZero or many (○<)

Crow Bar Segment and Crow Ball Circle are alternative drawings of the one-or-many and zero-or-many ends.

You can also right-click the end of a connector to choose its arrowhead.

Example ERD Workflow

Step 1: Identify Entities

For an e-commerce database:

  • Customer
  • Order
  • Product
  • OrderItem

Step 2: Define Attributes

Customer

  • customer_id (PK)
  • name
  • email
  • phone

Order

  • order_id (PK)
  • customer_id (FK)
  • order_date
  • total

Step 3: Draw Entities

  1. Create a table with the Table tool for each entity
  2. Add entity names as headers
  3. List attributes inside each table
  4. Mark primary keys (PK) and foreign keys (FK)

Step 4: Add Relationships

  1. Draw connector from Customer to Order
  2. Set "one" end at Customer (|)
  3. Set "many" end at Order (<)
  4. This shows: one customer has many orders

Step 5: Label Relationships

Add text labels to connectors:

  • "places" (Customer → Order)
  • "contains" (Order → OrderItem)
  • "is product in" (Product → OrderItem)

ERD Best Practices

Layout

  • Keep related entities close together
  • Use consistent entity sizing
  • Align entities in a grid pattern
  • Minimize crossing connectors

Naming

  • Use singular nouns for entities (Customer, not Customers)
  • Use consistent naming conventions (camelCase, snake_case)
  • Label relationships with verbs

Documentation

  • Include primary keys for all entities
  • Show foreign keys clearly
  • Consider adding data types
  • Note any constraints

Tips

  • Start from text: Paste a Mermaid erDiagram with Edit → Insert Mermaid (PRO) to get a first draft, then refine it — see Mermaid Support
  • Use auto-layout: Helps organize complex diagrams
  • Group related entities: Creates logical sections
  • Export for documentation: Include in technical specs and wikis
  • Version control: Save iterations as your database evolves