Relations
Definition
A relation connects two tables and defines how rows in one table reference rows in another.
Relations determine:
- how records are linked across tables
- the allowed number of connections between rows
- how connected data appears in forms and lists
- how users are allowed to create or reuse related records
A relation is defined once but has two perspectives: the source side and the target side. Each side has its own labels, API names, and linking rules.
Configuration fields
Source table
The table where the relation is defined.
Target table
The table referenced by the relation.
Relation labels
Relations define names from both sides.
| Field | Description |
|---|---|
| Source relation name | Label used when the relation is viewed from the source table |
| Target relation name | Label used when the relation is viewed from the target table |
These names are used in forms, lists, and navigation.
API names
Relations define API identifiers for both sides.
| Field | Description |
|---|---|
| Source API name | Identifier used when accessing the relation from the source table |
| Target API name | Identifier used when accessing the relation from the target table |
Constraints:
- Must be lowercase
- Allowed characters:
a–z,0–9,_ - Cannot start with a number
Cardinality
Cardinality determines how many rows may be connected between the two tables.
Each side of the relation defines whether it links to one or to many rows.
| Source type | Target type | Result |
|---|---|---|
| Source to one | Target to many | Many-to-one |
| Source to many | Target to one | One-to-many |
| Source to many | Target to many | Many-to-many |
| Source to one | Target to one | One-to-one |
The final cardinality is determined by the combination of both sides.
Linking rules
Linking rules control how users are allowed to create or connect related rows.
Each side of the relation defines its own linking rule.
| Rule | Behavior |
|---|---|
| No restrictions | Users may either link an existing row or create a new one |
| Prevent creating new rows | Users may only link existing rows |
| Prevent linking existing rows | Users may only create new rows |
| None | The relation is hidden from this side |
Linking rules are applied depending on which side of the relation the user is working from.
Hidden relations
If the linking rule is set to None, the relation is not displayed in forms when working from that side of the relation.
This is commonly used to hide technical or supporting relations and reduce interface clutter.
Cascade deletion
Cascade deletion can be enabled when the target side cardinality is "to one".
If enabled, deleting a row in the source table will also delete the connected row in the target table.
If the target table itself has cascade relations, deletions may propagate further.
Modification
The following properties can be changed after creation:
- relation names
- API names
- linking rules
- cascade deletion settings
Changes apply immediately to the system configuration.
Related components
Relations interact with several other system components.
| Component | Relationship |
|---|---|
| Tables | Relations connect rows between tables |
| Columns | Columns store the relation references |
| Classifications | Classifications may evaluate relations between rows |
| Permissions | Permissions may control access to related records |
| Interface | Forms and lists display relations based on configuration |
| Integrations | Relations are exposed through APIs and imports |
Related resources
Understand the concept