You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To create a relationship between attributes in a diagram...

  1. 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.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship.png

  1. Click OK on the confirmation dialog.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_1.png

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.

  1. The relationship is created.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_2.png

  1. 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
  2. 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.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_3.png

  1. 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. REPLACE WITH THIS IMAGE: Images/Relationships/showrelationsbetweenentities.pngNotice that the link line is thicker and darker to show that this single line represents multiple relationships.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_4.png

  1. 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.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_5.png

  1. 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.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_6.png

  1. The attribute and relationship are created.

REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_7.png

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.
REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_8.png
When Subtype/Supertype is selected some more options related to subtype relationships are available.
REPLACE WITH THIS IMAGE: Images/Relationships/Creating a Relationship_9.png

  • Constraints - If the relationship type is Subtype / Supertype, this field is enabled. The options are Inclusive or Exclusive. Visually these are displayed as black or white arrows respectively.
  • Layout subtypes - ticking this check-box enables the diagram to be refreshed immediately, displaying the new subtype / supertype relationship.

To create relations between attributes for multiple entities, refer Derive Foreign Key Joins Wizard for details.

  • No labels