UML Association
Explanation
Section titled “Explanation”An association is a line in a UML class diagram (see UML Class Diagram). It connects two classes. It says that at least one of the two classes refers to the other.
Drawing it
A binary association is a solid line between two classes. A reflexive (self) association is a binary association that connects a class to itself.
Names and role names
The line may carry a name. Each end may carry a role name. Officially, a role name is the association end name. It indicates the attribute name used in code.
Multiplicity
An end may show a multiplicity such as * or 0..1. Multiplicity states how many objects take part in the association. You read it from the perspective of the other end.
Navigability
An open arrowhead on one end documents that the class at that end can be reached efficiently. A cross on an end marks it as not navigable. A navigability arrow points from the source object to the target object.
Association or attribute
An association line and an attribute show the same relationship. They are semantically equal. The line gives more visual emphasis. Showing both is therefore redundant, so pick one.
Example
Section titled “Example”A diagram has two classes, Customer and Order. A solid line joins them. The end at Order is labeled orders with multiplicity *. The end at Customer is labeled buyer with multiplicity 1. An open arrow points to Order. The diagram says a customer can reach its orders. In code, Customer would hold an attribute named orders. The diagram does not also list orders inside the Customer box. That would show the same fact twice.
Trade-offs
Section titled “Trade-offs”An association line gives a relationship visual weight. An attribute keeps the diagram compact. Both mean the same thing, so choose by how much emphasis the relationship deserves. Do not use both for the same relationship.
Diagram source
@startumlclass Customerclass OrderCustomer "buyer 1" --> "orders *" Order : places@endumlChecks
Section titled “Checks”- Each relationship between two classes is shown either as an association line or as an attribute, not both.
- Association ends that matter carry a multiplicity such as * or 0..1.
- Role names on association ends match the attribute names used in code.
- Where reachability matters, navigability is shown with an open arrowhead or a cross.
Related
Section titled “Related”- UML Class Diagram
- UML Class Diagram Relationship
- Aggregation vs. Composition
- Common Class Diagram Modeling Mistakes
- Constraining Associations
- UML Structure Diagram
- Unified Modeling Language (UML)
- Domain Model
Sources
Section titled “Sources”- Class diagram - Wikipedia — en.wikipedia.org, accessed 2026-11-09
- 16.4 Ways to Show UML Attributes: Attribute Text and Association Lines | Applying UML and Patterns: UML Class Diagrams | InformIT — informit.com, accessed 2026-11-09