Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

defualt multiplicity is 1 or 1..many?

 
Stu Thompson
Hooplehead
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

What is the default multiplicity? E.g.: if none is given? In my searches through the forums and the Internet I have found both "1 and only 1" and "1 to many".

I am particulary interested in the official Sun opinion as I am working on certifications.

Thanks,

Stu

[ July 28, 2006: Message edited by: Stu Thompson ]
[ July 28, 2006: Message edited by: Stu Thompson ]
 
Scott Ambler
author
Ranch Hand
Posts: 608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the context? Are you talking about the UML? About something else?

- Scott
 
Stu Thompson
Hooplehead
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UML.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't a real default. Multiplicities may be intentionally suppressed in one diagram but are usually specified in another (way).

The Unified Modeling Language Reference Manual 2e (2004) (amazon US)
p. 467

multiplicity:
...
Discussion:
...
The multiplicity may be suppressed on a diagram, but it exists in the underlying model. In a finished model, there is no meaning to an "unspecified" multiplicity. Not knowing the multiplicity is no different from saying that it is many, because in the absence of any knowledge, the cardinality might take any value, which is just the meaning of many.
See unspecified value.


p.667

unspecified value:
...
Discussion:
...
For example, multiplicity cannot be unknown; it must have some value. A lack of any knowledge is tantamount to a multiplicity of many. The semantics of UML therefore do not allow or deal with the absence of values or unspecified values.
...
There is another sense in which "unspecified" is a useful part of an unfinished model. It has the meaning "I have not yet though about this value, and I have made a note of it so that I will remember to give it a value later".
...
Semantically complete UML models do not have default or unspecified values; they simply have values.


So in the absence of any other knowledge an association with unspecified multiplicities is interpreted as many-to-many.
So you better specify your multiplicities somewhere even if the association is many-to-many to avoid any confusion.
 
Stu Thompson
Hooplehead
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the authoritative response!

Stu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic