2

Is there any difference between 0..* and * for representing multiplicity in UML Class Diagrams? I cannot find a comprehensive guide online for multiplicity notations. To me they both seem to be saying the same thing conceptually.

Christophe
  • 68,716
  • 7
  • 72
  • 138
Ymi
  • 609
  • 6
  • 18

2 Answers2

5

While Dave's answer is correct, I'd like to add for the records that it's not just a question of personal opinions. The UML specifications are explicit about this notational shortcut:

UML 2.5.1, p.35: If the lower bound is equal to the upper bound, then an alternate notation is to use a string containing just the upper bound. For example, “1” is semantically equivalent to “1..1” multiplicity. A multiplicity with zero as the lower bound and an unspecified upper bound may use the alternative notation containing a single star “ * ” instead of “0..*” multiplicity.

Christophe
  • 68,716
  • 7
  • 72
  • 138
  • 2
    This exact question has already been asked. I like your answer, but I think it would be better if that would be added to the dupe target. – Geert Bellekens Nov 22 '21 at 09:05
  • @GeertBellekens ok. I see your point. I answered here because the dupe's answer was not explicit enough. I've now developed it there and will in some weeks clean up the least successful one. – Christophe Nov 22 '21 at 21:20
3

There's not any difference, or at least I've never heard of anyone using them differently.

To me, 0..* is more explicit in the sense that it says explicitly that 0 is an expected case. In another case you may write 1..* to show that 0 is not allowed.

In general, I would just pick one style and stick with it for consistency.

Dave S
  • 614
  • 4
  • 6