Boyce-Codd normal form is a normal form used in database normalization and is a slightly stricter version of 3NF. Boyce-Codd normal form removes all redundancies based on functional dependence.
If a schema is in Boyce-Codd normal form all of it's functional dependencies X
If a relational schema is in BCNF, then it is automatically also in 3NF because BCNF is a stricter form of 3NF.
Consider a table Address with the following attributes
HouseNumberStreetCityProvincePostalCodeand the following functional dependencies
HouseNumber, Street, PostalCode → CityHouseNumber, Street, PostalCode → ProvincePostalCode → CityPostalCode → ProvinceIs Address in BCNF? Justify why or why not and if it isn't decompose it such that it is.
Address is not in BCNF.
The candidate key is {HouseNumber, Street, PostalCode} (its closure yields all attributes). The dependencies PostalCode → City and PostalCode → Province violate BCNF because PostalCode alone is not a super key for Address.
To bring it into BCNF, we decompose using the violating dependency PostalCode → City, Province:
PostalArea(PostalCode, City, Province): Here PostalCode is a super key, so all functional dependencies satisfied.Address(HouseNumber, Street, PostalCode): No non-trivial functional dependencies remain that violate BCNF.This decomposition is loseless because the common attribute PostalCode is a super key for PostalArea.