寻找R的钥匙

发布于 2025-01-15 15:44:41 字数 355 浏览 3 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

看海 2025-01-22 15:44:41

是的,你是对的:假设 FR 依赖关系的覆盖,该关系有两个候选键:{A, B}{A, C}

通过计算 {A,B}+{A,C}+ 可以轻松显示这一点。

Yes, you are correct: assuming that F is a cover of the dependencies of R, the relation has two candidate keys: {A, B} and {A, C}.

This can be easily shown by computing both {A,B}+ and {A,C}+.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文