Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML One to Many Class Relationship

Tags:

uml

lucidchart

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

like image 985
Jacob Wilson Avatar asked Jan 29 '17 23:01

Jacob Wilson


1 Answers

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
like image 159
Jim L. Avatar answered Oct 13 '22 08:10

Jim L.