Associations

Figure 38 shows an extract from the Associations diagram from the UML specification. It defines the Association relationship type as the central metaclass. Associations are used to model structures made up of one or more classes or other UML types. The association is not directly linked to the partners in the relationship, but uses an element of the UML type Property, often referred to as association ends in this context. The Association::memberEnd property is critical here, and its multiplicity limit of 2 means that an association must have at least two association ends. Associations with two ends are also referred to as binary associations. These are normally shown as a graphic edge in diagrams. If an association has more than two ends, we refer to a multiple association. Multiple associations are shown in diagrams as diamonds with edges to the relationship partners.
These association ends can either be contained in the association itself using the Association::ownedEnd property, or can be an attribute of the opposite relationship partner (in the case of a class this would be the Class::ownedAttribute property). If the association end is an attribute of the opposite relationship partner, the association is navigable towards the association end. Alternatively, an association end that is not an attribute (that is, it belongs to its association as ownedEnd) can also be navigable if it is also assigned to the association as navigableOwnedEnd.

The association in Figure 39 links two classes with one another. The item association end is an attribute of the Order item class (Class::ownedAttribute property). You can identify this by the black dot at the end of the edge. As an attribute of the class, the end of a binary association is automatically navigable and is shown with an arrow head. If both ends of a binary association are navigable, displaying the arrow heads in the diagram is optional. This means that an order item recognizes the item assigned to it. By contrast, the order item association end is part of the association (Association::ownedEnd property) and is not navigable.