According to a wikipedia example, the following example is not bcnf because there are overlapping candidate keys (name and work, and name and contractor)
Name Work Contractor
John Plumber Plumber industries
Ryan Plumber Plumber industries
Ryan Elektrician Electro industries
However, isn't this table also not in 2NF? Consider that Name and work compose the primary key, contractor can then be derived from only work, so the database should be splitted?
If my statement is true, can somebody provide me an (easy) example of a database that is is not in BCNF, but is 2NF?
The basic difference between 3NF and BCNF is that 3NF eliminates the transitive dependency from a relation and a table to be in BCNF, the trivial functional dependency X->Y in a relation must hold, only if X is the super key.
Following are the various types of Normal forms: A relation is in 1NF if it contains an atomic value. 2NF. A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key. 3NF. A relation will be in 3NF if it is in 2NF and no transition dependency exists.
isn't this table also not in 2NF?
No it doesn't violate 2NF. 2NF requires that every nonprime attribute is fully dependent on every candidate key. Since the table in your example has no nonprime attributes it cannot violate 2NF. This is the essential difference between BCNF and 2NF/3NF. BCNF requires that every attribute must be fully dependent on every key. The lower normal forms of 2NF and 3NF only require that of nonprime attributes.
A nonprime attribute means an attribute that is not part of any candidate key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With