2

What is the difference between multiplicity * and 0..*?

For example two versions (A and B) of the same relationship: Example

What will be more correct for statement Web-service is used by any number of users?

Christophe
  • 68,716
  • 7
  • 72
  • 138
kyrylomyr
  • 12,192
  • 8
  • 52
  • 79

2 Answers2

2

While Bala's answer is correct, I'd like to add for the records that it's not just a question of style. 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.

So, both diagrams are equivalent. Moreover, if you're explicit with 0..*, you would probably do as well with 1..1:

enter image description here

Christophe
  • 68,716
  • 7
  • 72
  • 138
  • (For the historians among us: The quoted UML 2.5.1 is today the most recent version. At the time of the question in June 2011, UML 2.3 was still the version in force. It had the same quote in the part "Superstructure", page 99) – Christophe Nov 23 '21 at 18:28
1

They are one and the same; just a matter of preference. The x..y style is particularly used with you have know limits, usually other than 0 and *, like 1..10 or 5..*

Bala R
  • 107,317
  • 23
  • 199
  • 210