Show TOC

Relationships (CDM/LDM)Locate this document in the navigation structure

A relationship is a link between entities. For example, in a model that manages human resources, the Member relationship links the Employee and Team entities and expresses that each employee works in a team, and each team has employees.

For example, the employee Martin works in the Marketing team is one occurrence of the Member relationship.

When you generate a PDM from a CDM or LDM, relationships are generated as references.

Note Relationships are used to link entities in the ER, Barker, and IDEF1X methodologies, while Merise uses associations (see Associations and Association Links (CDM)). PowerDesigner lets you use relationships or associations exclusively, or combine the two methodologies in the same model. The following examples use the ER format. For more information about the other notations, see Supported CDM/LDM Notations.
A one-to-many relationship links one instance of the first entity to multiple instances of the second entity. Additional properties can make one or both sides of this relationship mandatory and define identification rules:

One-to-many relationship

Description



Each division may have zero or more employees

Each employee may belong to zero or one division



Each division must have one or more employees

Each employee may belong to zero or one division



Each division may have zero or more employees

Each employee must belong to one and only one division



Each division must have one or more employees

Each employee must belong to one and only one division



Each division may have zero or more employees

Each employee must belong to one and only one division

Each employee is identified uniquely by division number and employee number



Each division must have one or more employees

Each employee must belong to one and only one division

Each employee is identified uniquely by division number and employee number

A one-to-one relationship links one instance of the first entity with one instance of the second entity:

One-to-one relationship

Description



Each team works on zero or one project

Each project is managed by zero or one team



Each team works on one and one project only

Each project is managed by zero or one team



Each team works on zero or one project

Each project is managed by one and one team only

A many-to-many relationship links multiple instances of the first entity to multiple instances of the second entity. This type of relationship is not permitted, by default, in the LDM (see Enabling Many-to-many Relationships in an LDM):

Many-to-many relationship

Description



Each division may have zero or more employees

Each employee may belong to zero or more divisions



Each division must have one or more employees

Each employee may belong to zero or more divisions



Each division may have zero or more employees

Each employee must belong to one or more divisions



Each division must have one or more employees

Each employee must belong to one or more divisions