The foreign key relation editor is a wizard like modal editor that aims to simplify the process of creating and updating a foreign key relation between two tables.


The relation editor can be open either when a new foreign key relation is created by using the diagram palette - only if this option is set in preferences - or to edit an existing relation simply by doing a double-click on a relation element in the diagram. The wizard can be closed at any time by pressing the Finish button once the minimum information has been provided.


First wizard page shows properties of the foreign key relation, there are no required information although it is recommended to name the relation as of what it actually stand for, to give even more information the parent and child roles should also be specified.



Second and last wizard page is where the fields mapping is done. It is mandatory to have at least one pair of fields mapped between parent and child tables, however this is not enforced so a relation can be created even before all details of the two related tables were defined during the initial design phase. The validation process will report any relations with no fields mapped as an error.


Depending on the preference settings the editor might restrict mapping only to fields that are part of the parent table primary key, although this is the recommended way of defining relation field mapping it can still be overridden by unchecking the Only primary key fields check-box in which case the parent field drop down will show all fields of the parent table.


It is highly recommended that the mapped fields have the same data type, to avoid the automatic data type conversion on query joins for one, otherwise this will be reported as a warning when the diagram is validated.


The same field from neither parent or child can't be mapped twice for the same relation.