> For the complete documentation index, see [llms.txt](https://help.adalo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.adalo.com/database/relationships/many-to-many.md).

# Many-to-Many

Many-to-Many Relationships occur when each record in a collection relate to several other records in another collection, and vice versa.

{% hint style="warning" %}
Having too many relationship properties ***(especially many-to-many)*** on a single collection definitely degrades performance in Adalo, especially at scale.
{% endhint %}

## Learn About Many-to-Many Relationships

{% embed url="<https://youtu.be/M1o0RBUrBSI>" %}

***

#### **Many-to-Many Relationship**

A many-to-many relationship exists when records in one collection can be connected to multiple records in another collection, and vice versa.

#### **Example: Tasks and Users**

* One task can be assigned to multiple users **AND** One user can be assigned to multiple tasks

{% hint style="danger" %}

* **M-M Relationships can not be added on creation of new record in database.**
* **M-M Relationships can not be set upon Create Action for new record.**
  {% endhint %}

***

## **Relationships vs Join Collections**

Relationships are essential for organizing data in Adalo, but they come with performance trade-offs. Understanding the difference between direct relationships and junction collections allows you to make informed decisions about your data structure.

* **Use relationships** for simple, one-to-many connections and small datasets
* **Use junction collections** when possible for many-to-many relationships and before number of relationships to any single collection becomes an issue
* **Plan ahead:** Choose your data structure with growth in mind


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.adalo.com/database/relationships/many-to-many.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
