ER图和约束

时间:2016-08-18 18:47:14

标签: database entity-relationship

我无法对以下规则进行建模:"对于每次放映,座位只能有一张票#34;

Here's the diagram. I edited the diagram to fix the cardinalities.

2 个答案:

答案 0 :(得分:0)

规定的商业规则只说一个",明确暗示某事的独特性。

你应该如何建模"某事物的独特性"使用这种特殊的ER方言?它看起来并不适合这种作用。

答案 1 :(得分:0)

起初,我想将其建模为:

Seating ternary relationship

(有关符号的更多信息,请参阅我对is optionality (mandatory, optional) and participation (total, partial) are same?的答案)

但这只会强制执行功能依赖:

(Screening, Seat) -> Ticket

而不是

Ticket -> Screening, Seat

所以这可能是更好的选择:

Seating ER diagram

矩形菱形是一个关联实体 - 一种是另一种关系主体的关系。

相关问题