-
Notifications
You must be signed in to change notification settings - Fork 14
Notations
Philipp edited this page Feb 8, 2023
·
21 revisions
📖 Table of Contents
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
Syntax | Description | Bachman | Chen | Crow's Foot |
---|---|---|---|---|
[0..1] |
Zero or One | |||
[0..N] |
Zero or Many | |||
[1] or [1..1]
|
One and only One | |||
[N] or [1..N]
|
One or Many |
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 without labels | Binary with labels |
---|---|
Ternary without labels | Ternary with labels |
---|---|
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
}
Name | Syntax | Diagram |
---|---|---|
Aggregation (right) | A -* B |
|
Aggregation (left) | A *- B |
|
Composition (right) | A -o B |
|
Composition (left) | A o- B |
Usage
Development