# 4. Associations

## Create Associations

This section allows the recipe creator to associate/link [attributes](https://docs.imerit-prod.io/project-setup/create-recipe/3.-attributes) with [classes](https://docs.imerit-prod.io/project-setup/create-recipe/2.-classes). This is helpful when a class is to be linked to one or more than one attribute and not all.

{% hint style="success" %} <img src="https://254647936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzGccvqLYeyaJ6Dgazh7K%2Fuploads%2FPtR8n6k8SV8lfeETLAEz%2FBulb.png?alt=media&#x26;token=ec7271f0-1bef-4992-8c04-b668b1e44ea6" alt="" data-size="line"> If an attribute is associated with all the classes, it much more convenient to mark it as a [global](https://docs.imerit-prod.io/project-setup/3.-attributes#global-attribute-on-off) attribute while creating a [class level attribute](https://docs.imerit-prod.io/project-setup/3.-attributes#a.-class-level).&#x20;
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfGC_qHxTHbI_RTX_6qMRUbdSgmCKiqIiOnR9gjdp2DhZG_Jozx8BhsEaoGgxNjGNGSeNLTFdoJ6awD7lpim8VBqwWNq8r7dCYns459EoYK2ZpV-dzqQv4WLUSecITVX-tRigXDyZIXPBkE1OAKkEC7S4CX?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="188"><figcaption></figcaption></figure>

<figure><img src="https://254647936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzGccvqLYeyaJ6Dgazh7K%2Fuploads%2FbObkZ5Md2gjf1EmfqtpI%2Fimage.png?alt=media&#x26;token=0655737a-de94-4a18-8437-af14f1e32e63" alt=""><figcaption></figcaption></figure>

* The *New Association* form on the right side (highlighted area in red) is used to create associations/links between [classes](https://docs.imerit-prod.io/project-setup/create-recipe/2.-classes) and [attributes](https://docs.imerit-prod.io/project-setup/create-recipe/3.-attributes) created in the prior steps.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXeOw-g-Gl2YM-gE1iRqcND1B5QYVn2UD5f2-W4Xa-m_iPM0-nhvrZVqg1OZEFkSJaKx15ljTeFE0HYIDQvpieWUBu-SC8Uyn9RiBorgxdNjOALeWnMZkFrMptShPJZ_IOnEhX5kp-HNSzHf3PIT_JF3f3jb?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="375"><figcaption></figcaption></figure>

* Users can select multiple [attributes](https://docs.imerit-prod.io/project-setup/create-recipe/3.-attributes) and link them to a single [class](https://docs.imerit-prod.io/project-setup/create-recipe/2.-classes). On saving, the association is reflected in rows on the left side (highlighted area in pink).
* All the class level attributes that were marked as [global](https://docs.imerit-prod.io/project-setup/3.-attributes#attribute-type) during attribute creation are populated in the bottom left sections (highlighted area in yellow).
* Task level and batch level attributes that were created in the previous steps appear in their respective tabs in the bottom section (highlighted area in yellow).

***

## Create Relations

This section allows the recipe creator to create relationships between two classes with [instances](https://docs.imerit-prod.io/project-setup/2.-classes#has-instances).&#x20;

{% hint style="warning" %}
Relations can be formed only between classes that have [instance](https://docs.imerit-prod.io/project-setup/2.-classes#has-instances). Only these classes will appear in the selection dropdown of 'Subject' and 'Object' input.
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfN3SXI_m5wBrJzIBnyygVPPm3SfELfn7FhiPto7e5jlMApnl6S07ZCZj1Pk_jmW4jyAQPq50pW66pTWfC2Y5qwRZEItmJY1FGRdz2PUlWT4He_hnmC8iVCoT9qrllbFe018SpozqtoxiyDVQFO-sIg84A?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>

<figure><img src="https://254647936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzGccvqLYeyaJ6Dgazh7K%2Fuploads%2Fa66t0aWoJvyvzddmOSit%2Fimage.png?alt=media&#x26;token=37a0cb88-158c-44ea-9333-c8c9ee6c5e73" alt=""><figcaption></figcaption></figure>

* The *New Relation* form on the right side (highlighted area in red) is used to create a relationship between two classes. On saving changes, the relationship will get reflected in rows on the left side (highlighted area in pink).

  1. Enter Relation Name
  2. Choose a subject (child/following) class from the dropdown. For example, *Rider*
  3. Choose a object (parent/leading) class from the dropdown. For example, *Bicycle*

  <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcH7XOWylLOHDfFdOt4smajRJkOymTTn1rdHv3X8U9YJP9iByjILF8QL-nyy53Xz82Q_VFKqpTNIEzWsEnNoA6BheujTxDcDLjFCZmJLriUx0IbkbnG-43nxemu6bv4xpq4rLxXtq3Ogs5fNLhDy4KqySDJ?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="375"><figcaption></figcaption></figure>

[Learn how to use Relationship](https://docs.imerit-prod.io/annotation-tool/key-features/relationship).<br>
