Zicomi Systems Logo
contact us  |  your privacy
Company
Services
Products
Support
Resources
  OMG Standards
OMG Logo
  Have You Heard?
UML Diagrams
Zicomi Systems publishes some UML example diagrams online from the world famous UML dictionary.
more...
Version 2.5 Released
Zicomi Systems is delighted to announce that version 2.5 of Zicomi Mentor is released. With support for UML 2.0 and all thirteen UML diagrams
more...
Zicomi Systems' Director
speaks about the UML at Objects by Design - an informative interview
more...
Partner Programme
Zicom Systems is delighted to announce a new world wide partner programme, become a partner today.
more...
OMG Member
Zicom Systems is made a member of the OMG!
N-ary Association
N-ary Association  
An n-ary association is the more general form of association, it is an association between three or more classifiers that all participate in the relationship. It is the more general case of the more specific binary association, but has different semantics. Multiplicity may be used on any of the roles, but no role can contain an aggregation or composition symbol, or a qualifier.

This is alternative content.

Explanation

Many relationships involve just two things and can be modeled with the simple binary association. It is not however uncommon for three or more things to be involved in a relationship. An n-ary association can be used in these circumstances and allows any or "n" number of things to be related in a single cohesive group. An n-ary association is used when the three or more things are all related to each other in a structural or behavioral way. It does not replace the use of two binary associations where a classifier is related to two other classifiers, but the latter two classifiers aren't related to each other. Think of two people being married by a celebrant or minister; all three are involved and have an association with each other.

Important Points

Neither an aggregate nor a composite can be set for the aggregation property of any association end in an n-ary association An n-ary association has "n" association ends that are connected to the "n" classifiers participating in the association relationship. None of the association ends can have the value of aggregate or composite for the aggregation attribute. Visually this means that the part of the association that connects with the classifiers will not be adorned with the diamond icon, hollow or filled.
Qualifiers can not be used with n-ary associations. Qualifiers are not permitted to be used with n-ary associations.

Related Entries

Association
Association  More General
An association is related to an n-ary association because it is a more specific or limited expression of the same concept. An association is a relationship between two (and only two) classifiers, whereas an n-ary association is a relationship between three or more classifiers. The association represented by a single line is more formally known as a binary association. The word binary here denotes the number of classifiers that can participate in the relationship ? two (and only two). An n-ary association is said to be ternary or more ?denoting that three or more classifiers must participate in the relationship.
Choice
Choice  Graphically Similar,  Confused with
A choice is related to an n-ary association only because it has the same fundamental shape - the diamond with three or more attached lines. Semantically they are not related. The lines in an n-ary association are associations representing structural relationships, whereas the incoming and outgoing lines (transitions) in a decision signify changes in state. They also appear in different UML diagrams. The n-ary association is used in the same diagrams where binary associations are found such as class, component and deployment diagrams, whereas the decision is found in state and activity diagrams.
Association Class
Association Class  Confused with,  Graphically Similar
An association class is related to an n-ary association because it is often confused with an n-ary association. The two elements however have very different semantics. The class part of the association class adds attributes and operations to the relationship, but it does not itself participate in the relationship. An association class connecting two classifiers can be confused with an n-ary association between three classifiers. They have a similar graphical appearance - there are lines connecting three classifiers. In the case of the n-ary association all three classifiers participate in the relationship and each classifier has a distinct relationship with the other two classifiers.

back to the index...
Unified Modeling Language and UML are either registered

trademarks or trademarks of Object Management Group, Inc. in the

United States and/or other countries.