N-ary Association in UML

A N-ary association allows you to create an association between more than two classifiers.
A N-ary association is a construct used in the UML class diagrams for modeling associations between more than two classifiers. It is depicted as a rhombus. The n-ary association shows its name in a separate label near its bounds. You can also associate an association class to the n-ary association that allows you to define additional properties. You can specify the multiplicity for each association that is part of the n-ary association. (e.g. if you have 3 classes in a ternary association you should specify 3 multiplicities for each class).
N-ary Association
N-ary Association

How to Add N-ary Association to Diagram

If you want to create an n-ary association for multiple classes, select them and then choose 'Create n-ary association' from the context bar. The n-ary association will be added to the diagram. It will be centered on the related classes.
Inserting N-ary Association
Inserting N-ary Association

Add Association Class for N-ary Association

You can also add an association class to the n-ary association. Just select the rhombus symbol and click on 'Add Association Class' in the context bar.

N-ary Association Examples

You can find some diagram examples for UML n-ary association here:

New Comment

Comment