Associations
*An association is a relationship that exists between two or more entities. It can carry attributes that characterize the association between these entities
Associations can be compared to links between index cards.
The following drawing provides a three-dimensional view of the situations a data diagram can store.
Peter and Mary are clients. Peter has made reservations numbers 312 and 329.
A data diagram should be able to store all situations in the context of the company, but these situations only.
*The diagram should not allow representing unrealistic or aberrant situations.
Examples of associations:
A client issues an order.
An order includes several products.
A person works for a company.
An alarm is triggered by a sensor.
A sensor covers a zone.
A window displays a string of characters.
Creating an Association
To create an association:
1. In the data diagram objects toolbar, click the Association button.
2. Click one of the entities concerned, and holding the mouse button down, drag the mouse to the other entity, before releasing the button.
A line appears in the diagram to indicate the association.
3. To specify the association name, right-click the association and select Properties.
*Make sure you click on the line indicating the association and not one of the roles located at the ends of the association.
4. In the Characteristics page, in the Local Name field, enter the association name.
5. Click OK.
Example
You can also delete an element or link you created in error by right-clicking it and selecting Delete.
Defining association roles (ends)
*A role enables indication of one of the entities concerned by the association. Indication of roles is particularly important in the case of an association between an entity and itself.
Each end of an association specifies the role played by the entity in the association.
The role name is distinguished from the association name in the drawing by its position at the link end. In addition, the role name appears in a normal font, while the association name is italicized.
*The status bar (located at the bottom of the window) also allows identification of the different zones: when you move your mouse along the association, it indicates if you are on an association or on a role.
When two entities are linked by only one association, the names of the entities are often sufficient to describe the role. Role names are useful when several associations link the same two entities.
Multiplicities
Each role in an association has an indicated multiplicity to specify how many objects in the entity can be linked to an object in the other entity. Multiplicity is information related to the role and is specified as a completely bounded expression. This is indicated in particular for each role that entities play in an association.
Multiplicity specifies the minimum and maximum number of instances of an entity that can be linked by the association to each instance of the other entity.
The usual multiplicities are "1", "0..1", "*" or "0..*", "1..*", and "M..N" where "M" and "N" are integers:
The “1” multiplicity indicates that each object of the entity is linked by this association once and once only.
The “0..1” multiplicity indicates that at most one instance of the entity can be linked by this association.
The "*" or "0..*" multiplicity indicates that any number of instances of the entity can be linked by the association.
The "1..*" multiplicity multiplicity indicates that at least one instance of the entity is linked by the association.
The “M..N” multiplicity indicates that at least M instances and at most N instances of the entity are linked by the association.
 
Example:
 
Other examples of multiplicity:
To specify role multiplicity:
1. In the data diagram, right-click the line between the association and the entity, to open the pop-up menu for the role.
2. Click Properties.
The Properties dialog box of the role opens.
3. Click the drop-down list then Characteristics.
4. In the Multiplicity field, select the required multiplicity.
The representation of the association changes according to its new multiplicities.
Aggregation
Aggregation is a special form of association, indicating that one of the entities contains the other.
Example of aggregation:
A car includes a chassis, an engine, and wheels.
To define the aggregation between the "Car" and "Motor" entities:
1. Right-click the role played by the "Car" entity in its association with the "Motor" entity and select Properties.
Role properties appear.
2. Click Characteristics.
3. In the Whole/Part field, select "Aggregate".
A diamond now appears on the role, representing the aggregation.
Composition
A composition is a strong aggregation where the lifetime of the components coincides with that of the composite. A composition is a fixed aggregation with a multiplicity of 1.
Example of composition:
An order consists of several order lines that will no longer exist if the order is deleted.
Composition is indicated by a black diamond.
To specify composition of a role:
1. Right-click the role and select Properties.
Role properties appear.
2. Click the drop-down list then Characteristics.
3. In the Whole/Part field, select "Composite".