Search code examples
umlnormalizationcomposition

In UML, does composition imply an association class?


In a UML diagram where one class is comprised by another class, is there an implicit association table, or does it need to be shown?

For example, if I have Chapters that are composition of Paragraphs, is this alone enough:

uml without explicit association class

Or does the association class to be explicitly shown like so:

uml with explicit association class

I've never seen it done like that latter example, so I'm assuming it's implied. Or maybe I haven't normalized the data properly (considering chapter both appears in the Chapter class and the Paragraph class).


Solution

  • Simply, there is no implication. If you need an association class, you need to define it. However, UML is not about diagraming, it's about modeling. You can omit your association class in a diagram if you want to. The association class will still exist in your model, though.