Page History
...
- Click on the attribute in the diagram, hold the mouse down and drag it to another attribute. This creates a relationship between the two attributes.
- Click OK on the confirmation dialog.
Note title Note To create composite foreign keys, create two or more relationships between the same tables and give them all the same non-empty constraint name.
- The relationship is created.
- It is possible to create more than one relationship between two entities by linking two or more attributes. In the example below, we have created links between the following attributes:
- product_code
- prod_line_code
- prod_group_code
- To have these relationships displayed in the diagram as separate links (as below), go to Tools > Settings>Repository>Category>Diagram>General and set the Link connection to Attributes.
- To have these multiple relationships displayed in the diagram as a single link (as below), right click on the category in the tree and select Settings > Diagram > Show relations between entities.
Notice that the link line is thicker and darker to show that this single line represents multiple relationships. - If the attribute you want to create a relationship to does not already exist in the table, 3D can add it automatically when creating the relationship. To do this, click on the header of the entity in the diagram and drag it to an attribute in the diagram.
- The confirmation dialog gives you the option to enter the name of the attribute that will be created. By default it is that same as the name of the attribute you dragged it to. Click OK.
- The attribute and relationship are created.
Note |
---|
...
| ||
When creating a relationship in a logical model, some additional options are available on |
...
the Create relationship |
...
dialog box. To start with a Relationship type |
...
option is added, giving the option to create |
...
a Subtype/Supertype |
...
relationship instead. When Subtype/Supertype |
...
is selected some more options related to subtype relationships are available.
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
To create relations between attributes for multiple entities, refer refer Derive Foreign Key Joins Wizard for details.