> 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.md).

# Relationships

This guide explains what relationships are inside if Adalo, the different types available, when to use them, and when to use alternative approaches like join collections for better performance.

### Introduction

Adalo is a relational database, meaning you can create relationships between one collection and another collection to link records together. Understanding relationships is crucial for building scalable, efficient apps in Adalo.

### What Are Relationships?

A Relationship is a connection between two collections that allows you to link records together and access related data. Instead of duplicating information across multiple collections, relationships let you reference data from one collection within another. In Adalo, this is done with MagicText and flyouts via Lists or **Available Screen Data**.

#### Real-World Example

Consider a fitness app where you have a Users collection and a Workouts collection. Instead of storing a complete copy of each user's data in every workout record, you create a relationship between them. This way, a single workout record can reference a user, and Adalo automatically pulls in the user's information when needed.

### Terminology: Adalo vs Coding

If you have experience with traditional databases and SQL, you might use different terminology than Adalo. Here's how they compare:

| Concept                 | Adalo Term   | SQL/Coding Term |
| ----------------------- | ------------ | --------------- |
| Data container          | Collection   | Table           |
| Individual item         | Record       | Row             |
| Data property           | Property     | Column          |
| Connection between data | Relationship | Foreign Key     |

### **How to Use Relationships**

#### Creating a Relationship Property

1. In your collection settings, click the "+" button to add a new property

   ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2F2K1C4uSazyESAmCg2PmM%2FScreenshot%202026-01-29%20at%201.00.39%E2%80%AFPM.png?alt=media\&token=f964c561-44b6-4482-882b-43556cf23450)
2. Select "Relationship" as the property type and select the collection it connects to.

   ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2Fr7wiTQOkSUVnciPtd8S8%2FScreenshot%202026-01-29%20at%201.01.25%E2%80%AFPM.png?alt=media\&token=e06ce75f-7f27-4d18-9bda-15f8012947fc)
3. Choose relationship type - ***This can't be changed in the future***.

   ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2FgJo4x86JLHPF62Jf9JrT%2FScreenshot%202026-01-29%20at%201.02.02%E2%80%AFPM.png?alt=media\&token=7c6b7806-de91-4337-b14d-c89d876dbe84)

#### Accessing Related Data in Your App

Once you've created a relationship, you can access related data throughout your app using flyouts.

**Many-to-One or One-to-Many**

* Parent Properties can be accessed via the Child record MagicText flyout.
  * ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2FgHjLo0QgAuwL0Gr2NvXB%2FScreenshot%202026-01-29%20at%201.04.42%E2%80%AFPM.png?alt=media\&token=1b823971-47ee-45aa-8a46-b73c45e215e3)
* Parent record MagicText flyout will only show ***count*** when attempting to access the child record properties.
  * ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2F8mhnYVz23MTk67jelpqZ%2FScreenshot%202026-01-29%20at%201.11.46%E2%80%AFPM.png?alt=media\&token=3066aca2-9065-48fd-a98e-62ddd730f7e6)

**Many-to-Many**

* M-M record MagicText flyout will only show ***count*** when attempting to access the child record properties.
  * ![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhGHkPsv15svPIU5I7C%2Fuploads%2Fpm9URp5AOrqinwCQQW5j%2FScreenshot%202026-01-29%20at%201.14.25%E2%80%AFPM.png?alt=media\&token=8909a3d4-89b4-4759-9cf1-936b914ee4a8)

### Performance Considerations

While relationships are powerful and convenient, they come with performance costs. Each relationship property you add to a collection increases the amount of data Adalo must load and process each time a record is accessed.

### Explore the three different types of relational properties available in Adalo below:

{% content-ref url="/pages/4xtHuKKPgEgOujPRL05Y" %}
[One-to-Many vs. Many-to-One](/database/relationships/one-to-many-vs.-many-to-one.md)
{% endcontent-ref %}

{% content-ref url="/pages/4VfFsUT4zinHaF5Nq2Da" %}
[Many-to-Many](/database/relationships/many-to-many.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LhGHkPsv15svPIU5I7C/pages/CInWhf0k5KjgfPvFGUne" %}
[Adalo Join Collections](/database/relationships/adalo-join-collections.md)
{% endcontent-ref %}


---

# 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.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.
