Create Discovered Foreign Keys

This dialog box is displayed if you right-click a relational model name in the browser and select Create Discovered Foreign Keys. It can help you to discover hidden foreign key relationships in the model. It is based on name and data type matching between columns in primary key columns, unique constraints, and other columns in tables.

You specify one or two foreign key column name policies to be used in the discovery process, and you can scan repeatedly with different policies and other options to see the keys that have been discovered.

If the relational model already contains foreign keys, then creating "discovered" foreign keys may create some foreign keys that seem "duplicates" of existing foreign keys (same basic information, but different foreign key names). All discovered foreign keys have the Name createdByFKDiscoverer and the Value true in the Dynamic Properties pane of the Foreign Key Properties dialog box.

Column to Filter and Filter: Lets you restrict the display based on a string in the name of the table, column, referred table, or referred key.

Referred Table: The table containing the key referred to by the specified column or columns in Table.

Referred Key: The key in Referred Table.

Table: The table in which the specified column or columns refer to the Referred Key in Referred Table.

Columns: The column or combination of columns in Table.

Single Use of FK Column: If this option is enabled, a foreign key column can be bound only to one foreign key.

FK Column Name Policy: The policy or policies to be applied when you click Scan Again:

Scan Again: Searches for foreign key relationships using the specified policies and options, and refreshes the list above in the dialog box.

OK: Creates foreign keys based on the results of the most recent scan, and closes the dialog box. (If you want to remove the discovered foreign keys, click Edit, then select Remove Discovered Foreign Keys.)

Cancel: Does not create foreign keys, and closes the dialog box.