Add a Synthetic Foreign Key
On this page
Use synthetic foreign keys to establish relationships between your tables before creating mapping rules. A synthetic foreign key 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.
Steps
On the diagram toolbar, click Add a synthetic foreign key.
Select the parent table.
You can select a parent table in two ways:
Click on a single table or,
Click and drag between your choice of parent and child table. If you select your parent and child table in this manner, step 5 is completed.
On the Add relationship pane, select the cardinality.
When you select One to one, each row in the parent table must relate to at most one row in the child table.
When you select One to many, each row in the parent table can relate to zero or more rows in the child table.
Click the Parent field drop-down and select a parent field.
Click the Child table drop-down and select a child table.
To represent the potential relationship, a blue line appears between the parent table and child table on the relational model.
Click the Child field drop-down and select a child field.
Select a child field whose values correspond to those in the parent field.
Click Save and close.
Next Steps
To edit or delete a synthetic foreign key, click on the line in the relational model between two tables. On the Relationships pane, you can click the Edit relationship or Delete relationship button.