dbForge Studio allows creating two types of relations: physically existing foreign key relations and virtual relations.
They represent physically existing foreign key relations between tables. On the diagram, these relations are displayed as connecting lines. Their appearance depends on the selected notation.
Options available for managing physical relations are as follows:
Click a relation and press the DELETE key, then click Yes in the appeared dialog box.
When you delete a relation from the diagram, the corresponding foreign key is deleted from the database.
To change the relation parent table, drag the parent end of the relation to another table. You cannot change the relation child table.
The relation cardinality is determined automatically from the child table constraints and cannot be changed by a user except for editing child table constraints.
Relations on the diagram correspond to existing foreign keys in a database. When you create a relation on the diagram, a foreign key constraint is created in the database. If the foreign key cannot be created in the database, the relation cannot be created on the diagram.
They allow you to create relations between tables if their storage engine does not support foreign keys. Virtual relations do not exist physically, but only stored on the diagram, however they can be converted to physical foreign keys. On the diagram they are displayed as thin dotted lines connecting tables.
You can move, bend, reroute virtual relations, drag a relation’s parent end to another table the same way as you do with physical relations.
You can also select entire tables to create a virtual relation between them. In this case, the Virtual Relation Properties dialog box will appear where you should select constraints and referenced columns.
Do either of these actions:
Use the Virtual Relation Manager window to view, edit, remove virtual relations, generate their DDL, convert to Foreign keys, etc.
To open it, click the Virtual Relation Manager icon on the toolbar or, on the View menu, point to Other Windows, and click Virtual Relation Manager. Right-click a required relation in the grid and select a required command on the menu.
Each relation has a comment - a yellow rectangle with a relation foreign key name. Select the Show Relation Comment check box in the diagram options or click Show Comments on the Diagram toolbar to display comments. By default, they are displayed near the child end of relations. You can drag them to any other place, and they will move with the relation. To hide a comment for a specific relation, click it and hit the DELETE key. To display it again, right-click the relation and select Show Comment on the shortcut menu.