Cardinality
The data model must have the capability of representing the number of occurrences of objects in a given relationship. Tillmann [TIL93] describe the cardinality of an object relationship pair in the following terms:
The Cardinality is the specification of the number occurrence of 1 [object] which can be associated to the number of occurrences of anther object. The Cardinality is mostly expressed as simply one or many example for a husband can have only 1 wife although a parent can have many children. Now suppose that all combination of one and many 2 [objects] can be associated as
- One-to-one (1:1)-an occurrence of object a can associated or one and only one occurrence of object B can relate to only one occurrence of A. example for a wife only one husband and a husband can have only one wife.
- One-to-many (1:N)-One occurrence of object A can associated to more than one occurrences of object of B but an occurrence of B can associated to only one occurrence of A. example for a mother can have many children but a child can have only one mother.
- Many-to-many - An occurrence of object A can associated to one or more occurrences of B although an occurrence of B can associated to one or more occurrences of A. example for an uncle can have many nephews although a nephew can have many uncles
Cardinality describes the maximum number of object relationships which can participate in a relationship. It does not moreover give an indication of whether or not a particular data object must contribute in the relationship. To denote this information the data model adds modality to the object relationship pair.