Docs Menu
Docs Home
/
Relational Migrator
/

Synthetic Foreign Keys

On this page

  • Use Cases
  • Behavior
  • Get Started
  • Learn More

Relational Migrator allows you to create synthetic foreign keys. Foreign keys define and display a relationship between two tables through shared values. A synthetic foreign key also represents a relationship between two tables, but unlike a regular foreign key, it does not exist in the source database and can be defined directly using Relational Migrator. Synthetic foreign keys represent relationships between tables that allow you to then create mapping rules based on those relationships.

Use synthetic foreign keys when foreign keys aren't defined in your source database but a logical relationship exists between two tables. Create synthetic foreign keys before you create mapping rules to define relationships between your tables before defining relationships between your tables and collections.

  • You can add synthetic foreign keys using the diagramming toolbar in the Relational model. You cannot use the MongoDB model to add synthetic foreign keys.

  • You can only build synthetic foreign keys on a single field from each table.

  • You can only have one synthetic foreign key defined on a single foreign key field.

  • You can create a synthetic foreign key between any columns and tables, but if the table rows do not share common values in the selected columns, embedded documents and arrays are not populated during the migration job.

  • Add a Synthetic Foreign Key

Back

Customize ID Fields