gpt4 book ai didi

relational-database - 数据库 BCNF 违规

转载 作者:行者123 更新时间:2023-12-02 17:36:16 26 4
gpt4 key购买 nike

我对 DB BCNF 违规标准的一个特定方面感到困惑。这是一个例子:

R(ABCDEF)

FD 是 BC->D, C->AF, AB->CE

我已导出候选键为 AB 和 BC

考虑到所有 FD 至少包含部分候选键,该关系在 BCNF 中是正确的吗?

谢谢大家!

最佳答案

您导出了正确的 key :AB 和 BC。

The relation is in BCNF right, given all of the FDs contain at least part of the candidate keys?

没有。通俗地讲,当且仅当每个 FD 中的箭头都是来自候选键的箭头时,关系才属于 BCNF。换句话说,当且仅当每个函数依赖的左侧是候选键时,关系才属于 BCNF。 C->AF左边是C,但C不是候选键。所以 R 不在 BCNF 中。

(来自 OP 的评论......)

And one more thing, if I want to find out the violations in R, should I select one CK and compare all the FDs against that CK, or should I use all of the CKs when comparing the FDs?

使用所有候选键。规范化始终将所有视为候选键。

关于relational-database - 数据库 BCNF 违规,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26519806/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com