Multiplicity (UML)

from Wikipedia, the free encyclopedia

Multiplicity (Engl. Multiplicity ) denotes an interval of non-negative integers in the Unified Modeling Language (UML), a modeling language for software and other systems. The interval is determined by a lower and an upper limit. For a UML model element that has a multiplicity, it usually applies that it can hold a number of values ​​or objects, whereby the specific number must be greater than or equal to the lower and less than or equal to the upper limit of the multiplicity. An unlimited value is also permitted as the upper limit . The concept of multiplicity is related to that of cardinality in database modeling .

The multiplicity is often untereSchranke..obereSchrankespecified, with *the upper limit standing for the value unlimited and is *often used as an abbreviation for 0..*. untereSchranke must be less than or equal obereSchranketo. It is not allowed that both bounds are 0 or unlimited . If this is not the case, but both limits are the same, it is only possible to obereSchrankeenter.

An element with multiplicity 0..1is said to be optional . A multi-valued element is an element with an upper bound greater than 1. With a multi-valued element, you can specify whether the values ​​of the element are ordered ( isOrdered ) or not. The default is unordered. You can also specify whether each value may appear at most once in the values ​​of an element ( isUnique ).

Elements such as the attribute , the parameter , associations or the pin have a multiplicity. For the first two, the multiplicity is given in square brackets after the name or type, e.g. B. kinder [0..*].

Differences to UML 1.4

The concept of multiplicity has been simplified in UML2. In UML 1.4, a multiplicity could consist of several unrelated intervals, for example 0..6, 9..*, all numbers without 7 and 8. In UML2, several areas with a lower and an upper limit are no longer possible. The multiplicity must consist of exactly one connected interval.

swell

  1. Chris Rupp et al. a .: UML2 crystal clear. Practical knowledge for UML modeling and certification . 2nd Edition. Hanser, Munich 2005, p. 108. ISBN 3-446-22952-3 .