发表机构
University of Waterloo(滑铁卢大学)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本文针对实体-关系图中基数约束的歧义问题,提出统一记号Card(R;p;q),并给出n元关系约束数量、设计隐含约束及推理规则,最后通过案例验证。
AI 中文摘要
写在实体-关系图的一条边上的基数约束有两种相反的读法。在UML和陈氏原始模型所使用的读法下,标签与关系同一侧的实体集一起读;在标准数据库教科书所使用的读法下,标签与关系对侧的实体集一起读。这两种读法恰好相反,因此,如果读者采用了错误的读法,就会得到与设计者意图相反的含义。对于二元关系,困难仅限于解释,因为二元关系集所允许的两个约束都可以画出来。对于三个或更多实体集之间的关系,情况更糟:一个三元关系集允许十二个基数约束,而一个有三条边的图最多只能携带其中三个。本文提出一种记号 Card(R; p; q) = (lower, upper),它消除了歧义而不偏袒任何一方,并且不限于每条边一个约束。我们给出了一个n元关系集所允许的约束数量,展示了设计在从不写下它们的情况下决定了哪些约束,并陈述了两条推理规则——分解和增广——它们可以从一个约束推导出另一个约束,以及每条规则成立时的侧条件。最后,我们以一个完整的案例研究结束,该案例将三个业务需求转化为三个显式约束,以及设计自行决定的另外九个约束。
英文摘要
A cardinality constraint written on an edge of an entity-relationship diagram admits two opposite readings. Under the reading used by UML and by Chen's original model, the label is read with the entity set on the same side of the relationship; under the reading used by standard database textbooks, it is read with the entity set on the opposite side. The two readings are exact opposites, so a reader who assumes the wrong one takes away the opposite of what the designer meant. For binary relationships the difficulty is confined to interpretation, because the two constraints a binary relationship set admits can both be drawn. For relationships among three or more entity sets the picture is worse: a ternary relationship set admits twelve cardinality constraints, and a diagram with three edges can carry at most three of them. This paper presents a notation, Card(R; p; q) = (lower, upper), that removes the ambiguity without taking a side in it, and that is not limited to one constraint per edge. We give the number of constraints an n-ary relationship set admits, show which of them a design determines without ever writing them down, and state two inference rules, decomposition and augmentation, that derive one constraint from another, together with the side conditions under which each is sound. We close with a worked case study that turns three business requirements into three explicit constraints and nine more that the design decides on its own.
Comments16 pages, 8 figures