Re: [UML Forum] how to rep composition with a set of entities?

9 views
Skip to first unread message

Scott Finnie

unread,
Apr 7, 2013, 10:22:26 AM4/7/13
to umlf...@googlegroups.com

Yes. You can apply an 'exclusive OR' constraint between the two relationships. That would allow (1 or more Y) OR (1 or more Z).  On phone so can't look up ref at the moment, will look later. Google is also your friend.

As an aside: a rel can't be 'composite (1:1)' and allow more than 1 (Y or Z). It would have to be 1:Many in both cases.

Hth.

- Scott.

On Apr 7, 2013 2:28 PM, "dotnetguy" <andrew.d....@gmail.com> wrote:
Hello - Say entity X has a composite (1:1) relationship with entity Y and also with entity Z.   However, entity X should be allowed to have more than 1 Y and more than 1 Z.  Just not more than 1 unique combination of Y and Z.

Entity Y and Z are unrelated so there's no opportunity to combine Y and Z together into a YZ entity.  So does UML have a proper way to represent this relationship?

--
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
umlforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umlforum+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


H. S. Lahman

unread,
Apr 7, 2013, 11:58:12 AM4/7/13
to umlf...@googlegroups.com
Responding to dotnetguy...

> Hello - Say entity X has a composite (1:1) relationship with entity Y and also with entity Z. However, entity X should be allowed to have more than 1 Y and more than 1 Z.

Not if X has a 1:1 relationship with each. If X can be related to more
than 1 Y or Z, then the relationship must be 1:*.

> Just not more than 1 unique combination of Y and Z.

Then the 1:1 multiplicity captures that; X can't be related to more that
one pair of Y and Z at a time.

Note that the notion of specific combinations of Y and Z implies that
there is a relationship between Y and Z that describes the combinations.
In that case you could have 1:* relationships, plus that relationship.
(Given that specific combinations are important, the Y-Z relationship
should probably be there even if the relationships are 1:1 to constrain
which particular Y and Z a particular X can be related to.)

<pre>
1 1
+-------------- [X] --------------------+
| |
| * | *
[Y] ----------------------------------- [Z]
1 1
</pre>

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

Imagine how much more difficult physics would be if electrons had feelings
-- Richard Feynman

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
software book: Model Based Development, Addison-Wesley, 2011
geology book: The Evolution and Utilization of Marine Resources, MIT Press, 1972

Ken Lloyd

unread,
Apr 7, 2013, 1:08:05 PM4/7/13
to umlf...@googlegroups.com
UML has unions and intersections in aggregation.

-----Original Message-----
From: umlf...@googlegroups.com [mailto:umlf...@googlegroups.com] On Behalf
Of dotnetguy
Sent: Sunday, April 07, 2013 2:18 AM
To: umlf...@googlegroups.com
Subject: [UML Forum] how to rep composition with a set of entities?

Hello - Say entity X has a composite (1:1) relationship with entity Y and
also with entity Z. However, entity X should be allowed to have more than
1 Y and more than 1 Z. Just not more than 1 unique combination of Y and Z.

Entity Y and Z are unrelated so there's no opportunity to combine Y and Z
together into a YZ entity. So does UML have a proper way to represent this
relationship?

--
--
You received this message because you are subscribed to the Google Groups
"UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com To
unsubscribe from this group, send email to
umlforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups
"UML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to umlforum+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3272 / Virus Database: 3162/6229 - Release Date: 04/06/13

Reply all
Reply to author
Forward
0 new messages