Anatomy of a database relationship
Every relationship is said to have cardinality. The cardinality is the degree of the relationship. There are two types of degrees:
- Optionality: Is the minimum degree of the relationship and it can be of two types: Optional (circle) or Mandatory (perpendicular line).
- Cardinality: Is the maximum degree of the relationship and it can be represented with a crow’s feed for (many) or omitted for one.
Also every relationship has two sentences (or at least you should make an effort of typing them for readability and understanding purposes). The relationship phrases are as follows:
- Parent to child phrase.
- Child to parent phrase.
The following diagram illustrates the anatomy of a database relationship.
As you can see it is very important to determine the cardinality of the relationships in your data model as that will dictate your business rules. One last note, the dependent entity is called the child, and the referenced table is called the parent.