2

If I have the following relation R = (A, B, C, D)

And the functional dependencies:

  • A -> B, B -> A, CDB -> A, CDA -> B

The candidate keys are CDA and CDB.

The third normal form says that there can not be a functional dependency between non-prime attributes. A non-prime attribute is an attribute that doesn't occur in one of the candidate keys. Then that means that this relation already is 3NF since both A and B, that depend on each other, are part of one of the candidate keys, am I right?

If so, I have another question about BCNF. BCNF says that every determinant must be a candidate key. In this case, A and B are not candidate keys, so that violates BCNF, or am I missing something here?

Thanks.

1 Answer 1

1

You have relation 1-1 between A and B. Then you can make it appart in another table.

You have then 2 relations R1 = (A, B) and R2 = (A, C, D) or R2 = (B, C, D).

You choose between A and B to make attribute of R2. This choice will depend on the attribute size and fetch complexity. For example indexing integers is better than strings.

2
  • 1
    Yeah, but in which normal form is this? Since both A and B are included in one of the candidate keys, then they are not non-prime attributes, which means that it has to be in 2NF and 3NF since they deal with non-prime attributes. However, BCNF is more interesting because it's about determinants and that every determinant must be a candidate key. In this case neither A or B is a candidate key. Could you put this more in in the context of normal forms? Commented Oct 30, 2014 at 14:50
  • 1
    @user1062704 Remove either A or B from the relationship, into their own relationship (table). Until you do you are have 2NF.
    – BillThor
    Commented Oct 30, 2014 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.