Guizmoo03
Guizmoo03

Reputation: 660

UML class diagram: How to pass from relational diagram to class diagram

I'm working on a design of a workout follow up program.I have the following relational diagram and I want to create a class diagram with it.

relational diagram

In this case I should create an associative table as follow:

associativeTable

To explain the relation: a muscle may be targeted by many different exercises and an exercise may target many muscle.

Is the following representation correct? Can we improve it?

class diagram

If it is not correct, can any one suggest the best way to represent it in a class diagram?

Upvotes: 4

Views: 138

Answers (1)

Jim L.
Jim L.

Reputation: 6529

Your diagram is almost correct. You should replace all the occurrences of List<...> with association-end properties. To do this, you will need two associations. Here's an example:

enter image description here

I took the liberty of changing the multiplicity for the primaries. I think each direction has at least one. This shows why using associations is more expressive--with a List<...>, you cannot express min and max cardinalities.

Upvotes: 3

Related Questions