# Relationships

### 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="relationships/one-to-many-vs.-many-to-one" %}
[one-to-many-vs.-many-to-one](https://help.adalo.com/database/relationships/one-to-many-vs.-many-to-one)
{% endcontent-ref %}

{% content-ref url="relationships/many-to-many" %}
[many-to-many](https://help.adalo.com/database/relationships/many-to-many)
{% endcontent-ref %}

{% content-ref url="relationships/adalo-join-collections" %}
[adalo-join-collections](https://help.adalo.com/database/relationships/adalo-join-collections)
{% endcontent-ref %}
