问题
Say we have six columns A B C D E F, while removing transitive dependency we encounter the dependency where F-> E,D,C,B,A (say F is the primary key)
A->B (A is a transitive key towards B)
C->D (C is a transitive key towards D)
In this case what would we do, would we make a new table with four columns or will we make two tables with two columns each?
回答1:
If you have a relation schema R(A B C D) with dependencies:
A → B
C → D
then the following facts hold:
The key of the relation is:
A CThe relation is neither in Boyce-Codd Normal Form, since both dependencies (
A → BandC → D) violates the rule that the determinant should be a superkey, nor in Third Normal Form (since, in addition the the previous fact,BandDare not prime attributes).The relation can be transformed in Third Normal Form (and also Boyce-Codd Normal Form) by decomposing it in three relations:
R1(A B), withAas key and unique dependency:A → BR2(C D), withCas key and unique dependency:C → DR3(A C), withA Cas key and no non-trivial dependencies
EDITED
Since you have changed your question, the answer has to be completely different. You should be aware that to solve a normalization problem, one should have two things (and only those two things):
The list of the attributes of the relation schema
A set of functional dependencies
No other information is needed, while to give a partial information is only confusing and does not produces a correct answer.
So, if I have understood your problem, you need to normalize a relation schema
R(A B C D E F)
for which the following functional dependencies exists:
A → B
C → D
F → A B C D E
In this particular case,
the only (candidate) key of the relation is
F;the relation is not in BCNF since both
A → BandC → Dviolates the rule that the determinant should be a superkey, nor in 3NF (since, in addition the the previous fact,BandDare not prime attributes);the relation can be transformed in 3NF (and also BCNF) by decomposing it in three relations:
R1(A B), withAas key and unique dependency:A → BR2(C D), withCas key and unique dependency:C → DR3(A C E F), withFas key and dependencies:F → A,F → C,F → E.
来源:https://stackoverflow.com/questions/34469208/if-we-find-two-transitive-relations-what-would-we-do-in-normalization