An association connects two classifiers: the supplier classifier and the client classifier. Associations can help you make design decisions about the structure of your data. You can make decisions about not only the classes that are needed to contain the data, but also about which classes are needed to share the data with other classes. An association supports data sharing between classes or, in the case of a self-association, between objects of the same class.
For example, a Client class may have a single association (1) to an Account class, which indicates that each Account instance is owned by one Client instance. If you have an Account, you can locate the owning Client of that account. And with a given Client, you can find the Account of that client. The association between the Client class and the Account class is important because it shows the structure between the two classifiers.
Multiplicity information can be linked to an association to show how many instances of class A are linked with instances of class B. Multiplicity information can be linked to both ends of association relationships.
In domain modeling class diagrams, association relationships in a Java application represent the following things:
In visual representation, instance variables in a Java application become attributes in classifiers in domain modeling class diagrams. By default, all Java and container-managed persistence (CMP) entity bean fields are shown as attributes.
As the following figure illustrates, an association relationship is represented as a solid line between two classifiers.
| Java source code | UML visual representation |
![]() |
![]() |