寻找R的钥匙
R = {A, B, C, D, E, F, G, H, I, J}
F =
{{A,B} -> {C},
{A}-> {D,E},
{B} -> {F},
{C}-> {B},
{F}->{G,H},
{D}->{I,J}
问题是:R 的关键是什么?
我认为根据问题的表述方式,他们希望我找到一个候选键。
如果我有 AB+,我可以确定关系中的所有属性,这意味着 AB 是一个超级密钥。超级密钥 AB 的真子集 {A} 和 {B} 不是超级密钥,因此为什么 AB 是候选密钥。但据我所知,如果我们有 AC+,我们还可以找到另一个候选键。这是正确的还是我在某个地方犯了错误?
R = {A, B, C, D, E, F, G, H, I, J}
F =
{{A,B} -> {C},
{A}-> {D,E},
{B} -> {F},
{C}-> {B},
{F}->{G,H},
{D}->{I,J}
The question is: What is the key for R?
I assume based on how the question has been formulated that there is one single candidate key which they want me to find.
If i have AB+ i can determine all the attributes in the relation meaning AB is a superkey. The proper subsets of the superkey AB which are {A} and {B} are not superkeys, hence why AB then is a candidate key. But from what i can tell there is another candidate key aswell which we can find if we have AC+. Is this correct or am i making a mistake somewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,你是对的:假设
F
是R
依赖关系的覆盖,该关系有两个候选键:{A, B}
和{A, C}
。通过计算
{A,B}+
和{A,C}+
可以轻松显示这一点。Yes, you are correct: assuming that
F
is a cover of the dependencies ofR
, the relation has two candidate keys:{A, B}
and{A, C}
.This can be easily shown by computing both
{A,B}+
and{A,C}+
.