Notations - borkdominik/bigER GitHub Wiki

📖 Table of Contents

  1. Changing the Notation
  2. Overview of ER Notations
  3. UML Notation

Changing the Notation

The notation can be changed in the header of .erd files:

erdiagram Example

notation = default // change the notation

entity A {}
entity B {}

relationship Rel {
   A[1] -> B[N] // specify cardinality and participation constraint
}

The currently supported notations are:

  • Default: default (used if the notation is not specified)
  • Bachman: bachman
  • Chen: chen
  • Crow's Foot: crowsfoot
  • UML: uml

Overview of ER Notations

Syntax Description Bachman Chen Crow's Foot
[0..1] Zero or One Bachman Zero or One Chen Zero or One Crows Foot Zero or One
[0..N]  Zero or Many Bachman Zero or Many Chen Zero or Many Crows Foot Zero or Many
[1] or [1..1]  One and only One Bachman One Chen One Crows Foot One
[N] or [1..N]  One or Many Bachman Many Chen Many Crows Foot Many

UML Notation

UML is often used for data modeling and its concepts are similar to ER modeling with slight variations. In bigER, the UML notation has the following differences:

  • Binary relationships are rendered as direct connections with no connecting diamond node
  • Visibility of attributes can be specified
  • Aggregation and Composition relationships can be specified

Binary- & Ternary Relationships

Binary without labels Binary with labels
UML Notation: binary relationship without edge labels UML Notation: binary relationship with edge labels
Ternary without labels Ternary with labels
UML Notation: ternary relationship without edge labels UML Notation: ternary relationship with edge labels

Visibility

The UML Notation allows specifying the visibility of attributes. The visibility is shown in the diagram, and it has no effect on the output of the generators.

Show Textual ER Model (click to open)
entity Example1 {
    + attr1: INT key
    - attr2: VARCHAR
    # attr3: VARCHAR
    ~ attr4: DATE
}

entity Example2 {
    public attr1: INT key
    private attr2: VARCHAR
    protected attr3: VARCHAR
    package attr4: DATE
}
Screenshot 2023-02-08 at 18 16 44

Aggregation & Composition

Name Syntax Diagram
Aggregation (right) A -* B Aggregation (right)
Aggregation (left) A *- B Aggregation (left)
Composition (right) A -o B Composition (right)
Composition (left) A o- B Composition (left)
⚠️ **GitHub.com Fallback** ⚠️