> For the complete documentation index, see [llms.txt](https://docs.datasuite.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasuite.vn/english/features/data-modeling/relationships.md).

# Relationships

A **Relationship** in a Data Model is used to link data between **Schemas** through their **Primary Keys**. Relationships connect otherwise separate datasets into a unified and structured data system.

#### Steps to Create a Relationship Between Two Schemas

{% stepper %}
{% step %}

#### Access the Data Model

Select a workspace, navigate to **Data Model**, and choose the Data Model you want to configure.
{% endstep %}

{% step %}

#### Open the Relationships Tab

Click the **Relationships** tab to view existing Relationships and set up new ones.
{% endstep %}

{% step %}

#### Add a New Relationship

Click **Add Relationship** to begin creating a new relationship.

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FXzGw8Ve1lclNOhhBLZst%2Fimage.png?alt=media&amp;token=65d34f8e-3152-4c76-b273-7eebc8cda7f9" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Define the Relationship

On the interface, drag a connection between two fields to open the **Add Relationship** modal.\
Enter the required information and click **Create**.

<figure><img src="https://207765737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpRDG3vvgCOF596sbdkH0%2Fuploads%2FGkq080pv2jzjSubSL0V3%2Fimage.png?alt=media&amp;token=599a14df-b4cc-4f58-aee0-2b2f7ad9360f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

#### Types of Relationships

* **One-to-One**: A record in the **From Node** is linked to exactly one record in the **To Node**.
* **One-to-Many**: A single record in the **From Node** is linked to multiple records in the **To Node**.
* **Many-to-One**: Multiple records in the **From Node** are linked to a single record in the **To Node**.
