Search code examples
umllucidchart

UML One to Many Class Relationship


I am very new to UML and am using Lucidchart to model some classes in java. I am trying to represent a one to many relationship where 1 artist will have many albums and each album will have 1 artist. Is this the correct way to model this relationship? ERD

EDIT

Thank you for your help. This is what I have come up with so far. I'm still a little confused about what else was said about the properties. Are the multiplicities and lines correct?

UML


Solution

  • Your diagram is incorrect as a UML diagram. I can tell because of the crow's foot on the end of the association.

    To make your diagram correct:

    • Change the crow's foot to a multiplicity of 0..*
    • Move the albums property to the Album end of the association (as you should never bury a list like this in UML--that's what associations represent!)
    • Change the Artist end of the association to a multiplicity of 1
    • Name the property on the Artist end of the association (e.g., artist)
    • Make a new class called Song (which is an actual concept with more information than a name, such as duration, composer, etc.)
    • Make a new association between Album and Song, creating appropriate multiplicities and properties