Versions Compared

Key

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

...

  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.
    Image RemovedImage Added
  2. Click OK on the confirmation dialog.
    Image Removed 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.

  3. The relationship is created.
    Image RemovedImage Added
  4. 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
  5. 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.
    Image RemovedImage Added
  6. 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.
    Image RemovedImage Added
    Notice that the link line is thicker and darker to show that this single line represents multiple relationships.
    Image RemovedImage Added
  7. 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.
    Image RemovedImage Added
  8. 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.
     Image RemovedImage Added
  9. The attribute and relationship are created.
    Image Added
Note

...

titleNote

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

...

Subtype/Supertype

...

 relationship instead.
Image Modified

When Subtype/Supertype

...

 is selected some more options related to subtype relationships are available.
Image Modified

  • 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 checkbox enables the diagram to be refreshed immediately, displaying the new subtype / supertype relationship.

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