A "cardinality" represents the number of potential associations between two records, through two fields located into two distinct tables.
DbView distinguishes between four kinds of cardinalities:
Please note that these notations are inspired from the regular expressions (widely used by developers).
Description | DbView notation | UML motation | Merise motation |
---|---|---|---|
One, and only one | 1 | 1 | 1,1 |
Zero or one | ? | 0..1 | 0,1 |
Zero, one or more | * | * | 0,n |
One or more | + | 1..* | 1,n |
A cardinality is associated to a join.
Graphically, cardinalities are represented in a four columns grid, in the middle of an arrow that represents a joini.
In the following text, we represent the four columns grid with the notation:
CA | @A | @B | CB
CA | CB | Description |
---|---|---|
* | * |
|
* | + |
|
* | ? |
|
* | 1 |
|
+ | * |
|
+ | + |
|
+ | ? |
|
+ | 1 |
|
? | * |
|
? | + |
|
? | ? |
|
? | 1 |
|
1 | * |
|
1 | + |
|
1 | ? |
|
1 | 1 |
|