11

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

Jacob Wilson
  • 430
  • 1
  • 5
  • 12
  • 3
    Lucidchart offers several modeling notations. You didn't take the UML one. The notation you're showing corresponds to the ER (entity-relationship) language – Jordi Cabot Jan 30 '17 at 05:31
  • 1
    This is getting better. Still some problems. Lose those list attributes, use property names at the ends of the associations, then reconsider some of your generalizations. E.g., not all `Band Members` and `Artists` are `Composers`. In real life, a `Person` can also be a `BandMember` in multiple `Bands`, which points out one reason why you shouldn't use generalizations for roles. – Jim L. Jan 31 '17 at 13:53
  • 1
    Some of the multiplicities are probably not right. E.g., An `Album` can have many `Artists` performing on it. An `Album` can have more than one `Band` playing on it. A `Song` can appear on many `Albums`. A `BandMember` can play different `Instruments` on various `Albums`. – Jim L. Jan 31 '17 at 13:57

1 Answers1

9

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
Jim L.
  • 6,177
  • 3
  • 21
  • 47