2NF(归一化)中的一些混乱
我在 2NF 规范化时遇到一些困惑
考虑 FD 集
FD1 ABD->C
FD2 BC->D
FD3 CD->E
这里的键是 ABD,ABC
主要属性-A,B,C,D
非主要属性-E
2NF-对于 2NF 中的关系,非主要属性应该是功能齐全,依赖于密钥。
FD3会违反2NF吗? CD 是密钥的真子集吗?还有一件事我想问一下,当它违反 2NF 时,我们如何决定将哪个 FD 放入单独的关系中?请帮忙
I have some confusion while normalizing in 2NF
Consider set of FD's
FD1 ABD->C
FD2 BC->D
FD3 CD->E
Here the keys are ABD,ABC
Prime Attributes-A,B,C,D
Non-Prime Attribute-E
2NF-For a relation to be in 2NF,Non Prime Attribute should be fully functional dependent on key.
Will the FD3 violates 2NF? Is CD proper subset of key?One more thing I want to ask how do we decide which FD to put in separate relation when it violates 2NF?Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CD 不是密钥的真子集,但 BC 是。
CD is not a proper subset of a key but BC is.
在 FD3 中,我们给出了 CD->E,其中 E 是非素数属性,CD 是素键的子集,因为 C 和 D 都是主键的一部分,我们不会接受 2NF 中的子集和其余两个(即 FD1 和 FD2)位于 2NF 中,因为 RHS 具有在 2NF 中接受的素数属性。
所以FD3并不违反2NF。
CD是真子集。
Well in FD3, we have given CD->E WHERE E is non prime attribute and CD is the subset of prime key as C and D both are the part of primary key and we will not accept those in 2NF which are the subsets and the rest of the two(i.e. FD1 AND FD2) they are in 2NF because there RHS has prime attribute whch is accepted in 2NF.
So FD3 doesn't violates 2NF.
CD is proper subset.