关系数据库设计中的 3NF
给定一个具有功能依赖的模式 R (A,B,C,D)
,F = {A->B, A->C}
我需要确定是否R 属于 3NF,但首先我需要确定候选键是什么,以便确定 B 和 C 是否包含在某个候选键中。我将如何确定候选键?
Given a schema R (A,B,C,D)
with functional dependencies F = {A->B, A->C}
I need to determine if R is in 3NF, but first I need to determine what the candidate keys are so I can determine if B and C are contained in some candidate key. How would I go about determining the candidate keys?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“我将如何确定候选键?”
使用归一化理论来确定键相当于考虑任何关系总是满足的琐碎依赖关系。在你的情况下,A->A 和 D->D。使用阿姆斯特朗增广公理或达尔文“统一定理”来确定在 RHS 上具有所有属性以及在 LHS 上具有最小属性集的 FD。
然后您将观察到某些属性依赖于密钥的适当子集。
也许可以将问题标记为“家庭作业”。
"How would I go about determining the candidate keys?"
Using normalization theory to determine keys amounts to considering the trivial dependencies that any relation always satisfies. A->A and D->D in your case. Use Armstrong's axiom of augmentation, or Darwen's "unification theorem", to determine the FD that has all attributes on the RHS, and a minimal set of attributes on the LHS.
You will then observe that there are certain attributes that depend on a proper subset of the key.
And perhaps label the question as "homework".