I must respectfully disagree strongly with arbert and the materials he has linked to.
BCNF is distinctly defined from 3NF for very good reasons.
A relation in 3rd Normal Form has no non-key Functional Dependencies.
Boyce-Codd Normal Form only becomes applicable to a relation if it has overlapping composite keys - if the keys are separated out to different relations, the design is in BCNF.
A relation with no overlapping composite keys is in BCNF and automatically in 3NF.
A relation with overlapping composite keys is NOT in BCNF, but may still be in 3NF.
Example:
Hotel room booking system, with from and to dates:
BOOKING (ROOM_NUMBER, ARRIVAL_DATE, DEPARTURE_DATE)
Candidate keys are (ROOM_NUMBER, ARRIVAL_DATE) and (ROOM_NUMBER, DEPARTURE_DATE). To normalize, the relation would be split into two relations:
BOOKING_ARRIVAL (ROOM_NUMBER, ARRIVAL_DATE)
BOOKING_DEPARTURE (ROOM_NUMBER, DEPARTURE_DATE)
In most instances, people tend to avoid this by using a surrogate key, e.g.:
BOOKING (BOOKING_ID [pk], ROOM_NUMBER, ARRIVAL_DATE, DEPARTURE_DATE)
But, the problem with this design is that it is then necessary to write complicated trigger code to avoid data integrity problems (e.g. to restrict overlapping bookings for a single room). It is arguably easier to write this constraint with the earlier correct design.
Jeff
Main Topics
Browse All Topics





by: arbertPosted on 2003-05-25 at 15:03:57ID: 8581339
Spelling :) The result really isn't the same. check out this link-gives a pretty good example:
4/zaiane/m aterial/no tes/Chapte r7/ node12. html
http://www.cs.sfu.ca/CC/35
Brett