Cardinality (data modeling)

Cardinality (data modeling)

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:
* a "Doctor" table full of doctor informations
* a "Patient" table with patient informations
* and a "Department" table with an entry for each department of the hospital.

In that model:
* There is a many-to-many relationship between the records in the doctor table and records in the patient table (Doctors have many patients, and a patient could have several doctors);
* a one-to-many relation between the department table and the doctor table (each doctor works for one department, but one department could have many doctors).

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.

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:

External links

* [http://www.datamodel.org/DataModelCardinality.html Data Model Cardinality - http://www.datamodel.org/]
* [http://www.agiledata.org/essays/umlDataModelingProfile.html#Relationships UML multiplicity as data model cardinality] - http://www.agiledata.org


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Cardinality (disambiguation) — Cardinality may refer to* Cardinality of a set, a measure of the number of elements of a set in mathematics * Cardinality (data modeling), a term in database design * Cardinality (SQL statements), a term used in SQL statements * Cardinal utility …   Wikipedia

  • Data Format Description Language — (DFDL, often pronounced daff o dil) is a modeling language from the Open Grid Forum for describing general text and binary data. A DFDL model or schema allows any text or binary data to be read (or parsed ) from its native format and to be… …   Wikipedia

  • Data model — Overview of data modeling context: A data model provides the details of information to be stored, and is of primary use when the final product is the generation of computer software code for an application or the preparation of a functional… …   Wikipedia

  • Data structure diagram — Example of a Data Structure Diagram. A Data Structure Diagram (DSD) is a data model used to describe conceptual data models by providing graphical notations which document entities and their relationships, and the constraints that binds them. The …   Wikipedia

  • Many-to-many (data model) — An Author can write several Books, and a Book can be written by several Authors In systems analysis, a many to many relationship is a type of cardinality that refers to the relationship between two entities (see also Entity Relationship Model) A… …   Wikipedia

  • Glossary of Unified Modeling Language terms — This glossary of Unified Modeling Language terms covers all versions of UML. Individual entries will point out any distinctions that exist between versions.A* Abstract An indicator applied to a classifier (e.g., actor, class, use case) or to some …   Wikipedia

  • Dimension (data warehouse) — This article is about a dimension in a data warehouse. For other uses, see dimension (disambiguation). In a data warehouse, a dimension is a data element that categorizes each item in a data set into non overlapping regions. A data warehouse… …   Wikipedia

  • One-to-many — may refer to: Multivalued function, a one to many function in mathematics Fat link, a one to many link in hypertext Point to multipoint communication, communication which has a one to many relation See also One to one (communication) Cardinality… …   Wikipedia

  • Entity-relationship model — A sample Entity relationship diagram using Chen s notation In software engineering, an entity relationship model (ERM) is an abstract and conceptual representation of data. Entity relationship modeling is a database modeling method, used to… …   Wikipedia

  • Object Process Methodology — (OPM) is an approach to designing information systems by depicting them using object models and process models. OPM was conceived and developed by Prof. Dov Dori, at the Technion – Israel Institute of Technology. A paper that first presented… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”