# Cardinality Constraints

They help us express the number of entities to which another entity can be associated via a relationship set.

They are most helpful in binary relationship sets.

For a binary relationship set, the mapping cardinality must be one of the following types:

* one to one
* one to many
* many to one
* many to many

In a ternary relationship, we usually limit the number of one-one relationships (denoted by an arrow) to 1.

If there is more than one arrow, there are two ways of defining the meaning:

A ternary relationship R between A, B and C with arrows to B and C could mean:

1. Each A entity is associated with a unique entity from B and C (or)
2. Each pair of entities from (A, B) is associated with a unique C entity, and each pair (A, C) is associated with a unique B


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/main-1/the-entity-relationship-model-details/cardinality-constraints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
