Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

  1. Image Added
  2. Click OK on the confirmation dialog.

...

  1. Image Added
    Note
    titleNote

    To create composite foreign keys, create two or more relationships between the same tables and give them all the same non-empty constraint name.

  2. The relationship is created.

...

  1. Image Added
  2. 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
  3. 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.

...

  1. Image Added
  2. 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 select Settings > Diagram > Show relations between entities. REPLACE WITH THIS IMAGE: Images/Relationships/showrelationsbetweenentities.png
    Image Added
    Notice that the link line is thicker and darker to show that this single line represents multiple relationships.

...

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

...

  1. Image Added
  2. 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 Click OK.

...

  1.  Image Added
  2. The attribute and relationship are created.

...

  1. Image Added

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

Image Added

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

Image Added

  • 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
  • checkbox 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.