Reputation: 660
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.
In this case I should create an associative table as follow:
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?
If it is not correct, can any one suggest the best way to represent it in a class diagram?
Upvotes: 4
Views: 138
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:
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