> For the complete documentation index, see [llms.txt](https://courses.parottasalna.com/database-engineering/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://courses.parottasalna.com/database-engineering/entity-relationship-diagram/cardinality.md).

# Cardinality

Defines the numerical attributes of the relationship between two entities or entity sets. The three main cardinal relationships are one-to-one (1:1), one-to-many (1:m), and many-many (m:n).

&#x20;**A one-to-one example**: would be one student associated with one login name.

&#x20;**A one-to-many example** (or many-to-one, depending on the relationship direction): One product line contains multiple products.&#x20;

**Many-to-many example**: Students as a group are associated with multiple faculty members (teachers), and faculty members (teachers) in turn are associated with multiple students.

<figure><img src="https://2781136461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK4KaCc7tzh0tRXwFV2A5%2Fuploads%2FRzlDvd7PApFDqvSLFzIW%2Fimage.png?alt=media&amp;token=6f56aab7-78e0-4202-b82b-54c08a3e744e" alt=""><figcaption></figcaption></figure>

**Cardinality views:** Cardinality can be shown as look-across or same-side, depending on where the symbols are shown.&#x20;

**Cardinality constraints and obligated (or participation constraint)**: The minimum or maximum numbers that apply to a relationship
