7. Relationships

Relationships are governed by rules and there are different semantics associated with each Relationship type.

Following are the general rules applicable to Relationships:

  1. Reverse Relationship is not allowed in case of any kind of Relationship type, for example: if Asset A and Asset B have a Relationship, another Relationship between Asset B to Asset A cannot be defined.
  2. Two Asset Types can have either Association or Classification Relationship between them, for example: if Asset A and Asset B already have an Association Relationship, they cannot have a Classification Relationship simultaneaously.
  3. There can be any number of Association or Classification Relationships between two Asset Types as long as Relationship Names are unique.
  4. Two Asset Types can have either Composition or Aggregation Relationship between them, for example: if Asset A and Asset B already have a Composition Relationship, they cannot have an Aggregation Relationship simultaneously.

Following are the semantical differences between each Relationship type:

Classification

  1. Classification is a Relationship where Destination Asset Type’s Instances are independent.

  2. A Destination Asset Type can belong to one or more different Source Asset Types.

  3. If a Source Asset Type is deleted, the Destination Asset Type’s Instances are not deleted.

  4. Creating a Source Asset Type’s Instance version does not create a version for the related Destination Asset Type’s Instance.

  5. Source and Destination Asset Types should not be same.

    Association Relationship

    Fig. 7.1 Classification Relationship

Association

  1. Association is a Relationship where Destination Asset’s Instances are independent.

  2. A Destination Asset Type can belong to one or more different Source Asset Types.

  3. If a Source Asset Type is deleted, the Destination Asset Type’s Instances are not deleted.

  4. Creating a Source Asset Type’s Instance version does not create a version for the related Destination Asset Type’s Instance.

  5. Source and Destination Asset Types can be same.

    Association Relationship

    Fig. 7.2 Association Relationship

Aggregation

  1. Aggregation is a Relationship where Destination Asset’s Instances are not independent.

  2. A Destination Asset Type cannot belong to two different Source Asset Types.

  3. If a Source Asset Type is deleted, all Destination Asset’s Instances are also deleted.

  4. Creating a Source Asset’s Instance version does not create a version for the related Destination Asset’s Instance.

  5. Source and Destination Asset Types should not be same.

  6. While creating an Aggregation Relationship, any Destination Asset’s Instance should not exist.

    Aggregation Relationship

    Fig. 7.3 Aggregation Relationship

Composition

  1. Composition is a Relationship where Destination Asset’s Instances are not independent.

  2. A Destination Asset Type cannot belong to two different Source Asset Types.

  3. If Source Asset Type is deleted, all Destination Asset’s Instances are also deleted.

  4. Source and Destination Asset Types both should be versionable.

  5. Creating a Source Asset’s Instance version, creates a version for the related Destination Asset’s Instance as well.

  6. Source and Destination Asset Types should not be same.

  7. While creating a Composition Relationship, any Destination Asset’s Instance should not exist.

    Composition Relationship

    Fig. 7.4 Composition Relationship

The table below explains the semantics taking two Asset Instances A and B as examples.

Table 7.1 Relationship Types semantics
Scenario Composition Aggregation Classification Association
If A and B are related and A is deleted B is also deleted B is also deleted B is not deleted B is not deleted
If A and B are related and B is deleted A is not deleted A is not deleted A is not deleted A is not deleted
If A and B are related and A is versioned B is also versioned B is not versioned B is not versioned B is not versioned

In RepoPro, a Relationship definition comprises four elements:

  • Relationship Type
  • Relationship Name
  • Source Asset Type
  • Destination Asset Type

For instructions on how to manage Relationships, visit: Manage Relationships.

Relationships are represented in RepoPro using a Relationship Tree, which is a visual representation of an Asset Type’s Relationships with other Asset Types and Instances. To view/edit Relationships, visit: Relationships.