TOИIC
Search…
Viewing and adding foreign keys
The Foreign Keys page lists all of the foreign key relationships that Tonic adheres to when it synthesizes or subsets your data, and when it applies generators to columns that are foreign keys or primary keys.
When you connect a source database, Tonic lists all of the foreign key relationships that are explicitly constrained in the database. You cannot use Tonic to change or remove them.
You can also specify any other foreign key relationships that you need Tonic to take into consideration.

Viewing foreign key relationships

  1. 1.
    You can toggle between viewing all foreign key relationships or adding foreign key relationships
  2. 2.
    You can search for particular foreign key relationships
  3. 3.
    Foreign key relationships that have a checkbox are virtual foreign key relationships that you created
  4. 4.
    Virtual foreign key relationships can be deleted
  5. 5.
    Foreign key relationships set at the database level are designated with a lock indicating that you cannot delete or make changes to them via Tonic

Adding foreign key relationships

  1. 1.
    You can search for any particular foreign key column to quickly filter through the list
  2. 2.
    You can select the column that will act as the foreign key by checking the box. You may select multiple foreign key columns.
  3. 3.
    A dropdown of all possible primary key columns will be shown. A primary key is required to create a foreign key relationship.
  4. 4.
    To complete the foreign key relationship creation process, click the button to create the foreign key relationships
  5. 5.
    A preview of all foreign key relationships that Tonic will create will be listed here. You may delete the ones you do not want.