Foreign Keys are used to connect different tables of your data model. The 'Keys' section provides an overview of all connections in your analysis and allows you to create new ones.
Foreign keys list
The Foreign keys list displays the assigned connections between the tables in your data model.
- Add foreign key: create a new connection between two data tables (see 'Add or edit foreign key' section below).
- Search: search a table name to look for foreign keys assigned to it.
- Connected table 1: the first element that composes the pair of connected tables.
- Connected table 2: the second element that composes the pair of connected tables.
- Delete: deletes the foreign key. You must hover your mouse over the desired key to display this button.
- Edit: edits the foreign key (see 'Add or edit foreign key' section below). You must hover your mouse over the desired key to display this button.
Add or edit foreign key
The Edit foreign key screen allows you to create or modify existing connections between tables.
- Table 1: here you can select the first table you wish to connect.
- Table 2: here you can select the table you wish to connect Table 1 to.
- Foreign key column of table 1: select the foreign key column that corresponds to the column of table 2.
- Foreign key column of table 2: select the foreign key column that corresponds to the column of table 1.
- Add another connection: if more than one foreign key is necessary to connect these tables, click on the 'Add another connection' link to add one more foreign key selection row.
- Delete: click on the icon to delete the selected foreign key pair.
You can also add foreign keys relations directly on the Graphic Editor.