Jump to content

One-to-many (data model)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 104.174.83.241 (talk) at 03:50, 27 September 2016 (Undid revision 741378187 by 104.174.83.241 (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A mother may have many children, but a child has only one mother

In systems analysis, a one-to-many relationship is a type of cardinality that refers to the relationship between two entities (see also entity–relationship model) A and B in which an element of A may be linked to many elements of B, but a member of B is linked to only one element of A. For instance, think of A as mothers, and B as children. A mother can have several children, but a child can have only one mother.

In a relational database, a one-to-many relationship exists when one row in table A may be linked with many rows in table B, but one row in table B is linked to only one row in table A. It is important to note that a one-to-many relationship is not a property of the data, but rather of the relationship itself. A list of authors and their books may happen to describe books with only one author, in which case one row of the books table will refer to only one row of the authors table, but the relationship itself is not one-to-many, because books may have more than one author, forming a many-to-many relationship. There are some Examples for One to many relation:

The opposite of one-to-many is many-to-one.

See also

References