Unify Logo Footer.svg
Unify Data
Logo
Relationships (Ontology)

Relationships (Ontology)

Logo

3 mins read READ

Relationships connect the entities in your ontology model, describing how their records relate to one another. Once defined, they let you traverse from one record to its related records anywhere in the platform — on record detail pages, and in automations that query the ontology graph.

Overview

A relationship links two entities — for example, connecting a Customer entity to its Orders. Every relationship has a direction (a source entity and a target entity), a name, and a cardinality on each side that describes how many records can be linked. Together, cardinalities let you express one-to-one, one-to-many, and many-to-many relationships. Relationships live inside a model's Relationships tab, where you can view them as an interactive diagram or as a plain list, and create, edit, or delete them as your model evolves.

Creating a Relationship

Open a model's Relationships tab and click Add Relationship. This button appears in the tab header, or in the empty state if no relationships exist yet — but only if you have Edit access to the model. Without edit access, the button doesn't appear at all.

You'll also need at least two entities defined in the model before you can create a relationship. If the model has none or only one entity, the tab shows a No Entities Defined message with a shortcut to add another entity from the Entities tab instead.

To define the relationship, choose a Source Entity (the entity that initiates the relationship) and a Target Entity, then give it a Relationship Name. Set the Cardinality — One or Many — independently on each side. Finally, tell UnifyApps how the two entities join: pick the Primary Key field on the source entity and the matching Foreign Key field on the target entity.

Graph vs. List View

A toggle at the top of the Relationships tab switches between two views of the same data.

  • Graph — an interactive ER Diagram of the model. Each entity appears as a node showing its fields, with relationships drawn as connecting edges. You can hide or show entities that aren't connected to anything, and clicking any entity opens a details panel with its description, fields, relationships, and the data sources feeding it.

  • List — a table of relationships that's faster for scanning, editing, or deleting entries one at a time.

You can also open the diagram centered on a single entity by choosing View ER Diagram from that entity's own page.

Editing and Deleting Relationships

From List view, each row offers edit and delete actions. Deleting a relationship asks you to confirm, since the action can't be undone. Deleting only removes the connection itself — the entities on either side, and their underlying records, are left untouched.

Querying Relationships from Automations

Relationships you define here live in a shared graph, so related records can be traversed anywhere the platform supports it — including the Relationships view on a record's detail page, and graph-query steps inside automations, such as the Ontology node.

When an automation queries the graph through a model-aware query step, the platform checks that you can view (or, for updates, edit) the model you select, automatically scopes the query to just that model, and pages the results — 100 rows per page by default, up to 1,000 rows at most per page.

Note: Not every query path scopes itself to a model automatically. Older or lower-level graph-query steps that don't go through a model-aware query run exactly what's written against the entire shared graph, without an automatic model boundary. If you or your automation writes a raw graph query, always add your own model filter — otherwise the query can read or affect records belonging to other models too.

Notes

  • You need Edit access to a model to see or use Add Relationship.

  • A model needs at least two entities before you can create a relationship between them.

  • Deleting a relationship removes only the connection — the entities and their data stay intact.

  • Model-aware query steps in automations page large result sets automatically; you may need to fetch more than one page for bigger graphs.

  • Raw or older graph-query paths aren't automatically scoped to a model, so add your own filter when writing them to avoid crossing into other models.