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. Use the Table shape from the shape library, or
  2. Use the Entity symbol from a database notation pack

Each entity typically contains:

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

ERD Entity

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, open the Arrowheads section
  3. Choose crow's foot arrowheads:
    • Crow foot open: Zero or many (○<)
    • Crow foot closed: One or many (|<)
    • Crow foot one: Exactly one (||)

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 shape 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)

Complete ERD

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 on paper: Sketch your ERD before building in Diagrammix3
  • 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