Two (or more) aggregation relationships between two entities

橙三吉。 提交于 2020-01-16 18:10:50

问题


Consider the following (abstract) situation:

Two entities. There are two aggregation relationships between the two entities.

The diagram looks like this:

I know this might sound vague, but is there anything wrong with this picture?

I mean, are there any (obvious) problems that could arise from this kind of design?

Or am I being paranoid and there's absolutely nothing wrong with two (or more) aggregation relationships between two entities?


回答1:


For me there is nothing wrong in such design. Your Entity2 will have a different role in each context that's all.




回答2:


Nothing wrong with the diagram. Here is a more meaningful example.

-Kenji




回答3:


As long as the relationships are fulfilling really different roles (as you indictated by the numbering) I think it is a good approach, as you make them explicit.

Otherwise you could make use of the cardinality:



来源:https://stackoverflow.com/questions/23105732/two-or-more-aggregation-relationships-between-two-entities

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!