classumlassociationsclass-diagram

multiple association classes on the same relation


I want to add multiple association classes on the same relation, to manage absence and group affection between a student and course, I read that an association class is a description of a relation, so to not be in conflict with this definition I draw 2 relations between my classes, and for each relation there is a corresponding association class.

here is my current UML diagram: an UML class diagram, where two relations exist between two classes, each relation has its own association class

the diagram with multiple association classes on the same relation: an UML class diagram, where two association classes describe the same relation

so which on is following UML standards.

both diagram I believe will be translated into the same relation database scheme, so I just don't know which one is actually following the UML standards.


Solution

  • The association class in UML is at the same time an association and a class. The consequence is that it is the same thing with a unique name: