Cardinality (data modeling)
From Wikipedia, the free encyclopedia
In data modeling, the cardinality of one data table with respect to another data table is a critical aspect of database design. Relationships between data tables define cardinality when explaining how each table links to another.
In the relational model, tables can be related as any of: many-to-many, many-to-one (rev. one-to-many), or one-to-one. This is said to be the cardinality of a given table in relation to another.
For example, considering a database designed to keep track of hospital records. Such a database could have many tables like:
In that model:
one-to-one relationship is mostly used to split a table in two in order to optimize access or limit the visibility of some informations. In the hospital example, such a relationship could be used to keep apart doctor's personal or administrative informations.
A crow's foot shows a one-to-many relationship, single line is a one-to-one relationship.
[edit] UML Modeling
UML class diagram may be used for data modeling. In that case, relationship are modeled using UML associations, and multiplicity is used on those associations to denote cardinality. Here are some examples:

