-1

任务:

考虑一个关系 (,,,,,,) 及其 FD 集 = { → , → , → , → , → , → }。如果它不在 BCNF 中,则将其分解为 BCNF 关系的集合。确保您的分解是无损连接。

解释

嗨,我正在做我的数据库作业(关系设计章节)。我想我已经根据课堂示例掌握了基本过程。然而,这里棘手的部分是我们有一个与其他人没有关系的属性“H”,这让我很困惑。我应该如何处理?

尝试回答

•   We start from a schema: ABCDEGH, since H has no relations with any attribute, we decompose it into tables: H and ABCDEG
•   The FDs for ABCDEG remains the same, therefore key is E.
•   The FD D →AG violates BCNF (FD with non-key on LHS).
•   To fix, we need to decompose into tables: ADG and BCDE
•   FDs for ADG are { D → AG }, therefore key is D, therefore BCNF.
•   FDs for BCDE are { B → CD,  E → D,  BC → DE, E → B, CD → BE }
•   Key for BCDE is also E, and FD B → CD violates BCNF (FD with non-key on LHS).
•   To fix, we need to decompose into tables: BCD and BE
•   FDs for BCD are { B → CD } therefore key is B, therefore BCNF.
•   FDs for BE are { E → B } therefore key is E, therefore BCNF.
•   Final schema:  H, ADG, BCD, BE

你对我的错误有何评论?

4

1 回答 1

1

你的第一个子弹是错误的。如果您参考具有正确 BCNF 分解算法的已出版学术教科书之类的参考资料,则不会有该步骤。

于 2017-10-11T18:49:10.613 回答