Why does UML use "multiplicity" instead of "cardinality?"

Why does UML use "multiplicity" instead of "cardinality?"

Post by Thomas Gagn » Wed, 13 Aug 2003 13:27:20



I was reading some UML text tonight and thought it curious that it used
"multiplicty" to describe associations rather than the (I thought) well
established term, "cardinality."  Is there a reason for that?  It seems
like a word stretched to the limits to look like original thought.  Had
they not read the relevant ER literature or do they really mean
something completely different?

--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org

 
 
 

Why does UML use "multiplicity" instead of "cardinality?"

Post by Phli » Wed, 13 Aug 2003 22:46:05



> I was reading some UML text tonight and thought it curious that it used
> "multiplicty" to describe associations rather than the (I thought) well
> established term, "cardinality."  Is there a reason for that?  It seems
> like a word stretched to the limits to look like original thought.  Had
> they not read the relevant ER literature or do they really mean
> something completely different?

They mean at least a cardinality or two. One should be able to raise or
lower the number of them easily at such boundary conditions.

Think multiplexity of cardinalities.

--
  Phlip
          http://www.greencheese.org/ParodyMode
  --  "The Epiphany of the Epiphenomenon of the Epiphysis"
        - some jerk-off maliciously pretending to be Henry Miller  --

 
 
 

Why does UML use "multiplicity" instead of "cardinality?"

Post by Mark Woy » Wed, 13 Aug 2003 23:24:09


Cardinality refers to the *actual* number of cardinal (basic) members
in a set (http://whatis.techtarget.com/definition/0,,sid9_gci498885,00.html).

Since a UML class diagram is modeling classes, and not objects, i.e.
instances of classes, there are no sets defined. Multiplicity defines the
minimum and maximum number of objects that can be linked together through
an association.

In a nutshell, a class diagram models metadata, and an object diagram
models a single instance of the corresponding class diagram.

For example, given the class diagram:

                 *
        :A -------> :B

a corresponding object diagram might look like:

    anA:A -------> aB:B
         |
          -------> anotherB:B

The class diagram has a multiplicity of many (*), but the cardinality
of the A-B association in the object diagram is 2.

Yes, I believe they had read the relevant ER literature, and discovered
that it was wrong. ;-)

Mark


> I was reading some UML text tonight and thought it curious that it used
> "multiplicty" to describe associations rather than the (I thought) well
> established term, "cardinality."  Is there a reason for that?  It seems
> like a word stretched to the limits to look like original thought.  Had
> they not read the relevant ER literature or do they really mean
> something completely different?

 
 
 

Why does UML use "multiplicity" instead of "cardinality?"

Post by Thomas Gagn » Thu, 14 Aug 2003 01:34:31


Hmm.  

The first diagram shows that A associates with 0-many Bs.  The diagrams
are never really about classes, they're about instances of the classes.
 So the second diagram is simply a snapshot of one such association
where anA associates with two Bs.  No matter which you look at, both are
examples of a 0-Many association, or at least it looks that way to me.

I'm still missing something, eh?


>Cardinality refers to the *actual* number of cardinal (basic) members
>in a set (http://whatis.techtarget.com/definition/0,,sid9_gci498885,00.html).

>Since a UML class diagram is modeling classes, and not objects, i.e.
>instances of classes, there are no sets defined. Multiplicity defines the
>minimum and maximum number of objects that can be linked together through
>an association.

>In a nutshell, a class diagram models metadata, and an object diagram
>models a single instance of the corresponding class diagram.

>For example, given the class diagram:

>                 *
>        :A -------> :B

>a corresponding object diagram might look like:

>    anA:A -------> aB:B
>         |
>          -------> anotherB:B

>The class diagram has a multiplicity of many (*), but the cardinality
>of the A-B association in the object diagram is 2.

>Yes, I believe they had read the relevant ER literature, and discovered
>that it was wrong. ;-)

>Mark


>>I was reading some UML text tonight and thought it curious that it used
>>"multiplicty" to describe associations rather than the (I thought) well
>>established term, "cardinality."  Is there a reason for that?  It seems
>>like a word stretched to the limits to look like original thought.  Had
>>they not read the relevant ER literature or do they really mean
>>something completely different?

--
.tom
remove email address' dashes for replies
opensource middleware at <http://isectd.sourceforge.net>
http://gagne.homedns.org
 
 
 

Why does UML use "multiplicity" instead of "cardinality?"

Post by Costin Cozian » Thu, 14 Aug 2003 03:40:07



> I was reading some UML text tonight and thought it curious that it used
> "multiplicty" to describe associations rather than the (I thought) well
> established term, "cardinality."  Is there a reason for that?  It seems
> like a word stretched to the limits to look like original thought.  Had
> they not read the relevant ER literature or do they really mean
> something completely different?

Actually the proper term is *cardinality constraint*.

Cardinality refers not to the constraint but to an actual set value as
in classical set theory. For example: Bernhard Thalheim: Entity
Relationship Modeling (Springer 2000). Incidentallly this renders mr.
Fowler's criticism useless.

Of course, "cardinality constraint" is to be preferred as sensible
no-nonsense English. Multiplicity is a very bad choice of words, but if
people want clumsy terminology, well, they can always standardize on it.

About  the UML committee, yes they apparently missed a lot of reading,
and consequently missed the chance to do a better job.

Cheers,
Costin

 
 
 

Why does UML use "multiplicity" instead of "cardinality?"

Post by Mark Woy » Thu, 14 Aug 2003 06:00:01



> Hmm.  

> The first diagram shows that A associates with 0-many Bs.  The diagrams
> are never really about classes, they're about instances of the classes.
>  So the second diagram is simply a snapshot of one such association
> where anA associates with two Bs.  No matter which you look at, both are
> examples of a 0-Many association, or at least it looks that way to me.

No, the first diagram shows that *class* A has an association with
class B, since there are no object instances shown. This diagram is
completely about classes, since there are no objects modeled. Thus, it
is not an example of a 0-to-many association, but rather a model that
states that any instance of A can have 0-to-many associations with
instances of B. There is a distinction. Associations exist between objects,
not classes. That is unless we're building a metamodel. :-)

In general, a class diagram is usually sufficient to model the semantics
of an application, i.e. no object diagrams are necessary. However, there are
some cases where modeling specific objects can convey important information.

Yes, the second (object) diagram is in fact a snapshot. It represents one
of many legal associations between instances of class A and class B. This
was my point. The cardinality of this association is 2, since there are
exactly 2 members of the set (of possible associations between A and B).
The multiplicity of the association between class A and B is zero to many.

As Constin points out, the actual ER term is cardinality constraint, not
cardinality. The cardinality of a set is the actual number of members at
any given time, not the maximum allowable number of members.

Mark

> I'm still missing something, eh?


> >Cardinality refers to the *actual* number of cardinal (basic) members
> >in a set (http://whatis.techtarget.com/definition/0,,sid9_gci498885,00.html).

> >Since a UML class diagram is modeling classes, and not objects, i.e.
> >instances of classes, there are no sets defined. Multiplicity defines the
> >minimum and maximum number of objects that can be linked together through
> >an association.

> >In a nutshell, a class diagram models metadata, and an object diagram
> >models a single instance of the corresponding class diagram.

> >For example, given the class diagram:

> >                 *
> >        :A -------> :B

> >a corresponding object diagram might look like:

> >    anA:A -------> aB:B
> >         |
> >          -------> anotherB:B

> >The class diagram has a multiplicity of many (*), but the cardinality
> >of the A-B association in the object diagram is 2.

> >Yes, I believe they had read the relevant ER literature, and discovered
> >that it was wrong. ;-)

> >Mark


> >>I was reading some UML text tonight and thought it curious that it used
> >>"multiplicty" to describe associations rather than the (I thought) well
> >>established term, "cardinality."  Is there a reason for that?  It seems
> >>like a word stretched to the limits to look like original thought.  Had
> >>they not read the relevant ER literature or do they really mean
> >>something completely different?

 
 
 

1. Technical: "98"..."99"...."100" instead of "2000"?

Since this year (1998) in effect is known as "98", and next
year is "99", will it help anyone to simply regard the year 2000
as "100", the next number in the sequence?

I'm a (former) programmer, been studying y2k for a while,
this idea just struck me, and I'm surprised I've never seen
it mentioned.

Perhaps there is no value.. but maybe someone out there
will find it useful to be able to expand to only 3 digits rather
than 4? Or create some other work-around?

Other ways to look at it: 1900 has become year "0"
(shouldn't cause any problems). Also consider the day
following 12/31/99 would be 1/1/100.

Perhaps on forms that are stuck with "19__" we can
write in or enter "100". (just ignore the "19")

Ah, it's a fun thing to think about anyway.

Tim Reynolds

2. Uniface and OCX

3. """Y2K"""""

4. Why the hell would M$ lower xbox prices?

5. Click "news", "options", "advanced"

6. Line-IN on a laptop?

7. Consensus on the value - "Priority" - "Priority Plus" - "Priority Premier"

8. bru crashes my Indy

9. Most frequently used "secondary character" or "symbol" keys used

10. "Is your Code Done Yet?" and "Testing made Palatable"

11. When/why did "programming" become "software development?"