I have one class called "Institution" which represents a public institution (with properties like id_inst, name_inst, tel_inst, fax_inst...). The institution can have affiliated institutions, for example a university is composed of different faculties (which are also institutions with the same properties and methods). Theses faculties can also have affiliated institutions : laboratories, annexes, etc.

How can I express this concept in a UML class diagram?

1 Answer 1


Recursive composition (or aggregation) is simply the composition or aggregation arrow looped back to the individual class. You can use the multiplicity notation to indicate any "can have" or "must have" relationships.

Figure 8 of Scott Ambler's tutorial on class diagrams provides an image of this.

  • How is that different from the Composite Design Pattern like in here? link
    – yossben
    Commented May 2, 2012 at 19:42
  • Actually, I want to build a tree with root "All institutions". How can I represent that hierarchy where all institutions are treated the same way? (no special treatment for leaves).
    – yossben
    Commented May 2, 2012 at 20:06
  • @yossben It's not different than the Composite pattern. As far as building the tree with a particular instance of a root, that's not appropriate for a class diagram - consider an object diagram.
    – Thomas Owens
    Commented May 3, 2012 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.