سؤال

Given a relation, R = ABCDE

and this set of FD's:

AB > C
DE > C
B  > D

I'm able to find the candidate key ABE (correct?)

I need to decompose this relation R into 3NF.

What I don't understand is, by what measure do you decompose? I figure you take the candidate key and the FD's in consideration, but what is the specific process? All that I've looked at has been too dense for me to apply to this small problem.

هل كانت مفيدة؟

المحلول

ABE is the only candidate key.

Start with the tests for 1NF, and show yourself that the existing relation R satisfies 1NF. When you find a normal form that R does not satisfy, fix it.

For example, in testing for 2NF, you see that the FD AB->C is a partial key dependency. (ABE is the only candidate key; C is dependent on only part of that key.) Use projection to remove C from R.

  • R { ABE CD} is what we started with. After removing C by projection we have
  • R1 { ABE D}, and
  • R2 { AB C}

Repeat until all your tables are in 5NF. (R1 is not in 2NF; R2 is in 5NF.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top