Creating Database Tables with Foreign Keys

You can create new database tables in a DB diagram using the context menu and new foreign keys with a table's carousel. If you want to create foreign keys that reference a table that already exists, drag this table from another tool window and drop it in the diagram.

Creating a New Database Table

How to proceed

  1. Place the mouse pointer at the chosen position in the diagram and select the table template from the mini toolbar in the context menu.

    A new table is created in the diagram. The name of the table is automatically selected to be edited.

  2. Enter the name for the table and confirm with the [Enter] key.

Tip

You can create various element types in Innovator diagrams in this way. The types of elements available in the mini toolbar primarily depend on the diagram type used, the model template used and the user role selected in a model.

Adding an Existing Database Table

How to proceed

  • Select the table in another tool window and drop it where you want it in the diagram.

    A table node that shows the existing table is created in the diagram.

Creating a New Foreign Key

How to proceed

  1. Select a table in the diagram.

    The carousel appears next to the table.

  2. Select the foreign key icon in the carousel and drag it onto the table to be referenced. This can be the table you first selected.

    The foreign key is created and shown as an edge in the diagram. The foreign key references the primary key of the target table. For each column in the referencing key, a corresponding column is created for the new foreign key.