简体   繁体   English

如何将其转换为Boyce-Codd范式?

[英]How to transform this into Boyce-Codd Normal Form?

I don't understand what I am doing wrong here. 我不明白我在做什么错。 This is what I am being asked: 这是我被问到的:

Normalize the following schema into BNCF:
T ((A, B), C, E, F, G)

The functional dependencies besides the key are:
A, B → C, E
F, B, A → G
B → B
F, C → C, G, E
C, F → E
E → G, E

So, I came up with this: 所以,我想到了这个:

T ((A, B), C, E, F)
X((A,B), C, E)
W ((F,B,A), G)
Q ((B))
L ((F,C), G, E)
J ((C,F), E)
R ((E),G)

But it gives me this error: 但这给了我这个错误:

Result is not as expected. 结果不符合预期。 Modify your input and try again. 修改您的输入,然后重试。

And I have no clue where the error is. 而且我不知道错误在哪里。 Can someone explain to me what I should do? 有人可以向我解释我该怎么做吗?

If the nested parentheses indicate a CK (candidate key) then 如果嵌套括号指示CK(候选密钥),则

A, B → C, E is implied by the CK CK表示A, B → C, E
F, B, A → G ditto F, B, A → G同上
B → B is trivial B → B是微不足道的
F, C → C, G, E is implied by F, C → G, E F, C → C, G, E隐含F, C → G, E
C, F → E is redundant given F, C → G, E 给定F, C → G, E C, F → E是多余的
E → G, E means F, C → G, E is implied by F, C → E E → G, E表示F, C → G, EF, C → E隐含

{A, B} being a CK means A, B → C, E, F, G , plus we have F, C → E and E → G . {A,B}为CK表示A, B → C, E, F, G ,加上F, C → EE → G We can use a BCNF algorithm to get a decomposition comprising ((A, B), C, F) plus your J ((C,F), E) and R ((E), G). 我们可以使用BCNF算法获得包含((A,B),C,F)加上J((C,F),E)和R((E),G)的分解。

You don't explain your solution (what BCNF algorithm you are using and what choices you made). 您无需解释解决方案(您正在使用哪种BCNF算法以及做出了哪些选择)。 But note that the FDs that hold in a relation are all the ones generated by Armstrong's axioms when some explicitly given ones hold. 但是请注意,当某些明确给定的FD持有时,关系中持有的FD都是由阿姆斯特朗公理生成的。 (Including the ones that hold because we were told a CK.) Also note that in one BCNF algorithm when we pick some FD (functional dependency) X → Y that holds in schema R that violates BCNF we replace R by schemas X+ and R - (X+ - X); (包括因为我们被告知CK而持有的那些。)还请注意,在一种BCNF算法中,当我们选择在架构R中违反BCNF的某些FD(功能依赖性)X→Y时,我们将R替换为架构X +和R- (X +-X); and the set of FDs used is the closure of the explicitly given ones. 而使用的FD集合是显式给定的FD的闭包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM