You are here: Visual LANSA Logical Modeler > 7. Relationships > 7.2 Relationship Rules

7.2 Relationship Rules

Allowable relationships are defined based on entity type as follows:

Relationship Type

Source Entity Type

Target Entity Type

Parent/Child

Data, Variant or External

Data

Join

Data or Variant

Data, Variant or External

Variation

Data, Variant or External

Variant

Include

Data or Variant

Conceptual

 

 

For more information about how to define Source and Target entities, refer to 7.3 Source and Target Entities and 7.7.1 Create a Relationship.

Following is a summary of the Logical Modeler Relationships Rules for:

Note that Abstractions are not entities. They are objects used to group entities. Abstractions cannot be used in relationships.

Parent/Child Rules

Parent child relationships may be created between data, variant and external entities.

The identifying elements of the Parent entity are inherited by the Child entity. These elements are often called Parent Keys or Foreign Keys.

Any of the inherited identifying elements that would be duplicated as a result of multiple Parent/Child relationships will be shared automatically by the entity.

You are not allowed to create a loop structure using parent/child relationships. For example, if entity A is the parent of entity B, then entity B cannot be the parent of entity A. Or, if entity A is the parent of entity B and entity B is the parent of entity C, then entity C cannot be the parent of entity A or B.

In addition, an External Entity can only be the Parent entity in a Parent/Child relationship.

Join Rules

Two entities are allowed to have multiple join relationships. It is recommended that you use the descriptive prefix to identify the relationships.

Any of the inherited identifying elements that would be duplicated as a result of multiple relationships can be shared by using the Share inherited identifiers option.

A Variation relationship must exist for a Variant entity before you can create Join relationships using that Variant entity. Once the Variation relationship is created, the identifying elements are known in the Variant entity.

Note that an External Entity can only be the Target entity in a Join relationship.

Include Rules

Two entities are allowed to have multiple include relationships. It is recommended that you use the descriptive prefix to identify the relationships.

The target entity for an include relationship must be a conceptual entity.

You cannot create include relationships between conceptual entities.

An Includes relationship cannot be associated with an External Entity.

Variation Rules

The source entity for a variation relationship can be a data, variant or external entity.

The target entity for a variation relationship must be a variant entity.

You may create only one variation relationship to a variation entity.

A Variation relationship must exist for a Variant entity before you can create Join relationships using that Variant entity. Once the Variation relationship is created, the identifying elements are known in the Variant entity.