Developers · Data
Record Relations
Last updated 2 November 2026
You can create custom fields for storing data using
To import/export data with relations preserved, you need to relate the tables using the
- Relating records using the Instance Admin
- Relating records via code
Relating records using the Instance Admin
Visit the article Linking Databases Together for an in - depth guide on how to build relations between records using the Instance Admin UI. In a nutshell, the steps are as follows:
- Choose the database that you want to add relations to.
- Add a field to your chosen database.
- Make sure the field you are adding is a 'Data Source' field type.
- Select the database table that you want to connect to on the 'Data Source' options.
Relating records via code
To relate records via code, define relations in the Table files using the
app/schema/house.yml
name: house
properties:
- name: address
type: stringapp/schema/cars.yml
name: cars
properties:
- name: color
type: string
- name: house_id
type: integer
belongs_to: house