Previous Topic

Book Contents

Book Index

Next Topic

More Examples

Example: Person - Personal ID

Another similar example would be the relation between an actual person and some kind of official identification document.

The relation ID to Person would be expressed as ID 1:n – 1:1 Person, where ID is an identification document (e.g. ID card, passport, birth certificate). A Person will always have at least one form of ID, but may have more than one (drivers license, passport, etc.). An ID always belongs to exactly one Person. When a Person is born, then an ID (in this case a birth certificate) is always created (issued) and assigned to that person. This link between person and birth certificate can never be changed. The birth certificate cannot be reissued to another person, this instance is relation dependent. An instance can be relation dependent even if minimum cardinality is not 1.

In the example above, if we changed the relation to ID 1:n – 0:1 Person, it would mean that an ID can be created in advance and not assigned to any user initially (e.g. a birth certificate would be printed in advance before being issued to a particular person). However, once you assign a person to a birth certificate by filling it in, it is not possible to assign another Person to it. ID is relation dependent, the relation from ID to Person is unchangeable.

Example: Passenger - Airline Tickets

One more example of this cardinality: The relation between airline tickets and passengers. The relation would be Ticket 0:n – 0:1 Person.

Airline tickets are pre-printed and have a unique serial number. They exist before they are issued for a particular passenger. However, once the ticket has been printed with the details for a particular passenger, then it can no longer be changed. If there is a problem, the ticket will be voided and a new ticket issued. A Person (passenger) can have many tickets at any given time. It is, however, also possible for a person to have no tickets issued in their name at a given point of time. Thus minimum cardinality on both sides of the relation is 0 but the instance is still relation dependent: Once the link has been made, it cannot be undone.

See Also

Instances Are Relation Dependent