UML Arrows Explained - Know UML Relationship Types

UML diagrams use different types of arrows. Each arrow type represents another relationship. Sometimes the relationships are depicted in the same way, but they have a slightly different meaning. In that case, they can be annotated with a stereotype.

UML Class Diagram Arrows and Relationships

UML relationships uses various arrows that represent their meaning and allow us to differentiate between various kinds of relationships. UML class diagram uses connectors with arrows for associations, dependencies, and realizations. The other types of relationships (e.g. composition, generalization) can use diamonds and triangles (triangle arrows) as connector caps.

UML class diagram arrows
UML class diagram arrows

UML Arrows Meaning

Class diagrams use these UML arrows and connectors:

  • A solid line without any decoration represents an association.
  • Triangle connectors:
    • A triangle-head arrow with a solid line represents a generalization.
    • A triangle-head arrow with a dashed line represents a realization.
  • Arrow connectors:
    • An arrow with a dashed line is used for dependencies. Except for a general dependency it may be further specialized as
      • Abstraction
      • Substitution
      • Usage
    • An arrow with a solid line represents a directional association.
    • A double-arrowed line is used for bidirectional association.
  • Diamond connectors:
    • A filled diamond (or black diamond) with a solid line represents an composition.
    • An empty diamond (or white diamond) with a solid line represents a aggreation.
  • A circle with a plus sign represents a containment.

Comments

Blackburn 6 January 2021 0:25:13

Discrepency between text and image

The solid diamond and hollow diamond are transposed between the image and the accompanying text.

Dusan Rodina - softwareideas.net 6 January 2021 16:59:12

RE: Discrepency between text and image

Thank you for your notice. It's fixed now.

Mike Fair 11 August 2023 23:41:22

direction

Could you comment as to what meaning the direction of the arrow has, in relation to the nature of the association?

Hypothesis: the entity at the decoration (head) is an "association-word" of the entity at the tail. I.e. A is a dependency of B. Or B depends on A.

New Comment

Comment