15.00 - One-to-Many Relationships - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

One-to-Many Relationships

Assume two entities, A and B.

A 1:M relationship exists between entity A and entity B when each occurrence of entity A is related to 0, 1, or more occurrences of entity B, while each occurrence of entity B is related to at most one occurrence of entity A.

Somewhat more formally, Date defines 1:M relationships as follows: “Let A and B be sets, not necessarily distinct. Then a one-to-many correspondence from A to B is a rule that pairs each element of A with at least one element of B and each element of B with exactly one element of A. Equivalently, we might just say the one‑to-many correspondence is that pairing itself.” (2006, page 16, emphases added).

Conversely, Date defines a M:1 relationships as follows: “Let A and B be sets, not necessarily distinct. Then a many-to-one correspondence from A to B is a rule that pairs each element of A with exactly one element of B and each element of B with at least one element of A. Equivalently, we might just say the many‑to-one correspondence is that pairing itself” (2006, page 15, emphases added).

1:M relationships are commonly seen in real world situations. For example, each department has many employees, but each employee has only one department.

1:M relationships are graphed as follows: