Foreign Keys
In this window, you can define foreign key constraints for your table, allowing you to establish relationships between columns in your table and columns in another table. You can add or delete foreign key constraints using the + Add and X Delete Selected buttons.
You can configure the following for a foreign key:
-
Name: The name of the foreign key constraint. You can edit the name by double-clicking the cell.
-
Enabled: If this option is selected, then the foreign key constraint will be enabled.
-
Rely: If this option is selected, then the constraint can be relied upon.
-
Deferrable: If this option is selected, then the constraint check can be deferred until the transaction is committed.
-
Initially Immediate: If this option is selected, then the constraint is enforced immediately.
-
Validate: If this option is selected, then data in the table must comply with the foreign key constraint.
-
Referenced Constraint: Allows you to select the Schema, Table, and Constraint that you want to reference. You can also specify the On Delete action to define the behavior when referenced data is deleted, such as NO ACTION, CASCADE, or SET NULL.
-
Associations: Allows you to map the Local Column(s) in your table to the corresponding Referenced Column(s) in the related table.
Once your foreign key configuration is complete, click Apply to save your changes.