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.
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