In the Source: panel and the Target: panel, click on the name of each of the two columns involved in the Foreign Key relationship

7

From the On Delete and/or On Update combo boxes, select the appropriate referential integrity constraint

8

Click on the Apply or OK buttons to automatically generate the Foreign Key operations

Example:

The example below shows how a Foreign Key looks in a diagram:

Notes:

For MySQL databases, Foreign Keys are supported for InnoDB tables only.InnoDB is the default MySQL storage engine as of version 5.5; if you are modeling a MySQL database that is earlier than version 5.5 and you want to use Foreign Keys, you must ensure the Engine Tagged Value is set to InnoDB