Viewing and Modifying Foreign Keys

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Exploring and Changing the Database Structure > Designing Tables in Design Editor >

Viewing and Modifying Foreign Keys

After you have executed the change script, the foreign key ic_foreign-key-column icon for columns is displayed to the left of the column name in the Columns folder of the Online Browser and when you show the table in the Design Editor. In the Online Browser, the name of the foreign key constraint will also show up in the Keys sub-folder of the respective table and will be marked with the foreign key ic_foreign-key-constraint icon.

 

In the Online Browser, the column definition can be viewed in detail by expanding the foreign key entry in the Keys folder.

ob_foreign-key

In the Design Editor, the column the foreign key is assigned to is displayed in bold when you select the foreign key constraint in the Keys section.

design_FK-constraint

You can also display the referenced table in the Design Editor window. Right-click the table design and select Add related tables | Referenced Tables from the context menu. The table that is referenced by the foreign key constraint is added to the design. Click the connector line or the label to indicate all keys and columns that are involved in the foreign key relation.

design_foreign-key

 

Modifying a foreign key constraint

You can rename, delete or change the definition of a foreign key constraint. Note that the foreign key constraint is always deleted first and then recreated with the new definition. The respective SQL statement is generated automatically in the Database Structure Change Script window if you modify the foreign key definition in the Design Editor.


© 2019 Altova GmbH