Defining Foreign Key Constraints

Previous  Index  Next  How To Use

You can visually create a "referential constraint" or "foreign key constraint" by using the Foreign Key Constraint tool ( ), selecting the "master" or "parent" table first and then painting a line towards the "detail" or "child" table, as described in creating a link. You will now see a line pointing from the master to the detail table.


A referential link will only work if the target table (the master or parent) contains a Primary Key Constraint, as a row in the child table needs to "point" to 1 specific (and unique) row in the parent table.


An example referential constraint


You can double click the new line to edit the properties of the constraint, what is available here as options depends on the database system of the PDM.


Referential Constraint Properties Dialog


You select the primary key constraint from the drop down list at the right and select fields from the child table in the left hand side area of the dialog to match the constraint fields.