简体   繁体   English

候选键/还原

[英]Candidate Keys / Reduction

I have a relation 我有关系

R = (S, T, U, V, W, X, Y, Z) which has the FD's R =(S,T,U,V,W,X,Y,Z)具有FD

TW -> Y TW-> Y
TW -> Z TW-> Z
Y -> X Y-> X
Y -> S Y-> S
V -> U V-> U
X -> T X-> T

I'm trying to find the candidate key for R but because of the relationship 我正在尝试找到R的候选键,但是由于这种关系

TW -> Y -> X -> T TW-> Y-> X-> T

I can't figure out what it is. 我不知道是什么。 I know it has to have 'V' and 'W' in it but I don't know if I should also have 'X' or 'T'. 我知道它必须有“ V”和“ W”,但是我不知道我是否也应该有“ X”或“ T”。

The candidate key of this relation R is TWV and XWV both because they cannot be derived from one another. 此关系R的候选关键字是TWV和XWV,因为它们不能彼此导出。 so this relation has two candidate keys and it is possible for aa relation to have more than two candidate keys. 因此此关系有两个候选键,并且一个关系可能有两个以上的候选键。

You say that W is dead sure inside any candidate key. 您说W在任何候选键中都是确定的。

Therefore, 因此,

TW -> Y -> X -> T

becomes 变成

T -> Y -> X -> T

So, which one do you choose, X or T ? 那么,您选择X还是T呢?

And why not Y ? 为什么不Y

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

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