# How is every binary relation BCNF?

So, as part of my assignment, I have to prove that any relation with two attributes is in BCNF.

As per my understanding, if for a relation we have 3rd normal form and one non key attribute functionally determine key attribute, it violates the BCNF.

Say my relation consists of two attributes A1,A2

Scenario1(only one functional dependency)

``````A1 -> A2 (so A1 is the key, and A2 does not FD A1 : so no violation)
``````

same applies for

``````A2 -> A1
``````

But what if

``````A1->A2 and A2->A1
``````

Here key can be either A1, A2. And the other non key attribute functionally determines the key.

• Your conclusion "And the other non key attribute functionally determines the key." is not correct. Because the "other" is a key attribute as wel.. Oct 31, 2015 at 22:48
• "any relation with two attributes is in BCNF" is not true. {} is a determinant when every row has the same subrow value for the determined attributes. People often forget about {} as determinant. Including textbooks. PS When some FDs hold then others might have to also, per Armstrong's axioms. You need to analyze cases based on what all their non-trivial FDs are. Start from definitions. Jan 19, 2021 at 20:50

• What about the (rather weird) case with these FDs?: `()->AB , A->B, B->A` Nov 1, 2015 at 7:26