我需要帮助在数据库的概念模型中定义关系。我在PowerDesiner中这样做。我有3个实体(我们称之为A,B和C)。
A doesn't have to have B, if A has B then only once.
B has to have at least one A.
B may have C, but doesn't have to.
C have precisely two B.
C has at least one A.
C can have A only if A is part of B, which is in relationship with C (one of the two B to C).
A may have C, but doesn't have to.
这对我来说太复杂了,我有一个想法,但结果证明是完全错误的。它只是项目的一部分,但其余部分不影响那些3.我需要在概念层面上做这些限制,这正是我的问题。
我的第一个也是最好的想法是这个http://i.snag.gy/Ofdze.jpg,但是它不包括只有当A是B的一部分时C才能有A的条件,它与C有关(两个B中的一个)到C)
然后我想出了这个http://i.snag.gy/gKNQ9.jpg但是在我认为它不包含相同条件之前作为解决方案,更糟糕的是似乎真的搞砸了解决方案。