Question

What is the key difference between BCNF and 3NF

Asked by: julia3

The result is same sometime but what is the key diffrence betweem 2?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-05-25 at 13:23:28ID20625933
Tags

bcnf

,

between

Topic

Databases Miscellaneous

Participating Experts
2
Points
70
Comments
39

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Assigning function keys
    Hi #include<conio.h> #include<stdio.h> #include<stdlib.h> void main(void) { clrscr(); char string[81]; int key ; printf("Enter number of function key: "); gets(string) ; key = atoi(string); puts("enter string to assign to that key&quo...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

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:

http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter7/node12.html


Brett

 

by: jpkempPosted on 2003-05-25 at 21:56:02ID: 8582355

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

 

by: arbertPosted on 2003-05-26 at 01:21:10ID: 8583089

I respectfully read your answer and would also like a link that demonstrates what you're talking about....

 

by: jpkempPosted on 2003-05-26 at 01:31:00ID: 8583122

I've demonstrated the difference in my post.

For more information regarding this topic I recommend "The Database Relational Model: A Retrospective Review and Analysis" by C.J. Date, 2001, Addison Wesley Longman, ISBN  0201612941.

In it he refers to Carlo Zaniolo's paper "A New Normal Form for the Design of Relational Database Schemata", (ACM Transactions on Database Systems 7, No. 3 (Sept 1982).

He does explain how 3NF as it was initially described by Ian Heath in 1971 was equivalent to BCNF; and how the currently accepted definition of 3NF discludes BCNF. It is understandable that confusion has resulted in the literature.

Jeff

 

by: julia3Posted on 2003-05-26 at 22:33:54ID: 8587780

Thanx for recomending the book but i am not goin too far i am just learning to normalize basic tables.

 

by: julia3Posted on 2003-05-26 at 22:39:38ID: 8587796

For instance
if i hv these functional dependencies

Invoiceno                  -> invoiceDate, invoiceAmount, Custmerno

customerno               ->customerName, customerAddress, PaymentsReceived

mobileno, date, time ->numberDialed,Duration

mobileno                   ->serviceUser, serviceType, customerno

serviceType               ->planCost, includedCallAmount, callRate

If i want to change to BCNF do i need to change it to 1,2,3 NF first or i can do directly to BCNF
Can anyone explain me this with explanation comment to understand

 

 

by: jpkempPosted on 2003-05-26 at 22:57:36ID: 8587838

julia3,

A design is either unnormalized, in 1NF, 2NF, 3NF, BNCF or higher. Each normal form builds on the previous one, so if your design is in BCNF, it is automatically (by definition) already in 1NF, 2NF and 3NF.

In your design, where is the overlapping composite candidate keys? If there are none, then BCNF does not apply.

Disclaimer: it is impossible to correctly normalize a table design without knowing all the business rules.

Jeff

 

by: julia3Posted on 2003-05-26 at 23:03:24ID: 8587873

So jpkemp ,
I f i want to normalise it into BCNF i hv to follow from 1 NF right.
On above example- what r the possible primary keys and foreign keys, i need to know that right.
so if i want to change it into 1NF i hv to put under invoiceno (determining by invoiceno)

 

by: julia3Posted on 2003-05-26 at 23:03:44ID: 8587874

I am really tottaly confused...

 

by: jpkempPosted on 2003-05-26 at 23:07:33ID: 8587887

I've made a few assumptions here:

INVOICE (InvoiceNo [pk], InvoiceDate, InvoiceAmount, CustomerNo)
CUSTOMER (CustomerNo [pk], CustomerName, CustomerAddress, PaymentsReceived)
MOBILE (MobileNo [pk], ServiceUser, ServiceType, CustomerNo)
CALL (MobileNo, CallDate, CallTime, NumberDialed, Duration) pk=(MobileNo, CallDate, CallTime)
SERVICE (ServiceType [pk], PlanCost, IncludedCallAmount, CallRate)

I assume then that a customer cannot call more than one NumberDialed at the same time.

If (NumberDialed, CallDate, CallTime) is another candidate key for CALL, then BCNF does apply as you have two candidate keys that overlap.

Jeff

 

by: jpkempPosted on 2003-05-26 at 23:11:33ID: 8587914

To get into 1NF you remove all multi-valued columns.
To get into 2NF you remove all functional dependencies on part of a composite key.
To get into 3NF you remove all functional dependencies on non-key columns.
To get into BCNF you remove all functional dependencies on overlapping composite candidate keys.
To get into 4NF you remove all multi-valued dependencies.
To get into 5NF you remove all join dependencies.

P.S. There is a 6th Normal Form recently described, but I haven't read the book on this one yet.

 

by: jpkempPosted on 2003-05-26 at 23:11:55ID: 8587916

6th Normal Form: C.J. Date, “Temporal Data and the Relational Model”, 2003

 

by: julia3Posted on 2003-05-26 at 23:18:40ID: 8587970

Thanx jpkemp,
I am not worried about 4,5,6Nf
When we change into 3NF if we hv transitive dependecies does it violates 3NF
 
so is that the one u hv mentioned above is in 1,2,3 and BCNF orderly or we hv to normalised it
can u explain me frm that assumption
regards

 

by: jpkempPosted on 2003-05-26 at 23:21:18ID: 8587982

working...

 

by: jpkempPosted on 2003-05-26 at 23:25:50ID: 8588013

To explain BCNF a bit more in the context of your example:

CALL (MobileNo, CallDate, CallTime, NumberDialed, Duration) pk=(MobileNo, CallDate, CallTime)

Here, a problem exists if a user tries to insert the following rows:

('0123000001','01/01/2003','06:00','0123000002','00:30')
('0123000002','01/01/2003','06:00','0123000001','00:30')

Now, having a primary key on (MobileNo, CallDate, CallTime) does not restrict the insertion of rows like the above which are obviously invalid - two people can't call each other at the same time (one is the caller, the other is the numberdialed).

You could resolve this with a table-level trigger that checks for invalid rows before they are inserted. But, the relational model does not require triggers and so it must provide a way of avoiding this problem through the use of proper relational design.

BCNF resolves this problem but I'm not sure how to apply it here. I'm still looking.

Jeff

 

by: julia3Posted on 2003-05-26 at 23:30:36ID: 8588059

Suppose it is invoice (bill) to customer.
so here just think as invoice not the relationship of like u hv mentioned "two people can't call each other at the same time"

 

by: jpkempPosted on 2003-05-26 at 23:35:53ID: 8588081

Sorry I don't understand your last post. What dependency are you trying to resolve?

 

by: julia3Posted on 2003-05-26 at 23:37:50ID: 8588099

i mean i hv taken these FD from printed Invoice, in example i hv printed invoice with these FD

 

by: jpkempPosted on 2003-05-26 at 23:44:24ID: 8588140

I have to go to a physio appt now so I'll have to get back to you.

See you later
Jeff

 

by: julia3Posted on 2003-05-26 at 23:46:24ID: 8588172

Ok thanx a lot hope u will back and try to explain me
see u

 

by: jpkempPosted on 2003-05-27 at 18:47:33ID: 8594556

I've found a good reference in ch5 of Practical Issues in Database Management by Fabian Pascal (2000, Addison-Wesley). It recommends decomposition into BCNF using a surrogate key.

CALL (MobileNo, CallDate, CallTime, NumberDialed, Duration) pk=(MobileNo, CallDate, CallTime)

decomposition into BCNF could be:

CALL (CallNo [pk], MobileNo, CallDate, CallTime, Duration)
DIALLED (CallNo [pk], NumberDialed) fk CallNo references CALL(CallNo)

Here, a constraint would be added to CALL that validates that no other CALL exists where (MobileNo, CallDate, CallTime) = (NumberDialed, CallDate, CallTime).

If you need further help with the invoice relation, please explain what question you have.

Jeff

 

by: julia3Posted on 2003-05-27 at 23:39:11ID: 8595671

So what are my possible all relation while changing that above FDs into BCNF

i am little confuse with ur last comment

*Its getting long long so i hv increased the points for u thank u.

 

by: jpkempPosted on 2003-05-27 at 23:44:16ID: 8595722

My last comment was basically that I don't understand your requirements. What do you want? Do you want me to normalize your design for you?

Remember that your initial question was not "please normalize this for me" but "what is the difference between 3ND and BCNF". If I haven't explained this clearly enough let me know and I'll try to explain it better.

If you believe your design is not in BCNF, please explain in what way - because I don't know your business requirements I have insufficient information to normalize your design.

Jeff

 

by: julia3Posted on 2003-05-28 at 00:20:58ID: 8595990

Yha the question hv asked me to normalize the data structure to meet but i am familiar with definition of 1nf and 2 nf
confused with 3nf, and bcnf.
It says that to normalise into 1st, 2nd ,3rd, and through to bcnf
and i hav to indicate the primary, foreign key from that Dependecies.

 

by: jpkempPosted on 2003-05-28 at 00:23:18ID: 8596002

Is this a coursework question?

 

by: julia3Posted on 2003-05-28 at 00:29:49ID: 8596035

not exactly,
but its our exam sample question
y does it matter

 

by: julia3Posted on 2003-05-28 at 00:34:22ID: 8596058

There are lots of other questions i wanna ask .....more

 

by: jpkempPosted on 2003-05-28 at 00:35:21ID: 8596065

I'm happy to help you as much as possible. However, it matters because we aren't supposed to do homework here on EE - it is primarily a technical forum for experts to exchange information and advice. I'm very happy to help you understand the principles better, and point out areas of improvement/correction in your answers to exam questions, but I won't do the work for you - this would not be good service to you. You have to do the work, otherwise you will never learn.

Now, you have given your dependencies as follows:

Invoiceno                  -> invoiceDate, invoiceAmount, Custmerno
customerno               ->customerName, customerAddress, PaymentsReceived
mobileno, date, time ->numberDialed,Duration
mobileno                   ->serviceUser, serviceType, customerno
serviceType               ->planCost, includedCallAmount, callRate

I can't help you get this into BCNF unless you also provide all relevant business requirements. Alternatively, give your suggested design and I'll try to work out where the redundancies are. However, you must understand that it is simply impossible to accurately diagnose a problem without complete information.

Jeff

 

by: jpkempPosted on 2003-05-28 at 00:40:09ID: 8596084

julia3,

I had a look at your previous question which you asked, which obviously prompted this one.
http://www.experts-exchange.com/Databases/Q_20621735.html

The experts who helped you gave you lots of information which should be sufficient to answer your question, yet you still awarded a C (i.e. you felt they hadn't helped you enough).

I think you need to seek training in database fundamentals - this will be of great advantage to your learning, especially if you want to get into database design work in the future. I really recommend you attend a course in database design - you will get a lot out of it.

Jeff

 

by: julia3Posted on 2003-05-28 at 00:43:28ID: 8596101

Okay i c,
but if i got question like this-

realation R(A,B,C,D,E,F) IS IN 3NF . As (A,B,C) is primary key
FD given is-
E -> C

If i like to convert it into 2-3 relations, R1, R2 and R3 all in BCNF, do need to ask all relevant requirements.
Can i solve it just looking at relations and FD provided.
coz its diff as compare to previous question. and more confusion i hv understood some concept but in this case its diff.

 

by: julia3Posted on 2003-05-28 at 00:45:48ID: 8596110

Yha in prevous question i didn't get sufficient answer and some of their material only talks about 1,2 and 3nf
not bcnf, so i want to learn more.

 

by: jpkempPosted on 2003-05-28 at 00:47:28ID: 8596119

R(A,B,C,D,E,F) with (A,B,C) as PK cannot be in 3NF if the functional dependency E->C (FD on partial key) still exists. This would indicate the relation is only in 1NF.

Yes, you can solve it by just looking at relations and FD provided - the FD's represent the business rules as pertains to normalization.

Jeff

 

by: jpkempPosted on 2003-05-28 at 00:49:32ID: 8596125

RE your previous question:

microIT gave quite a good explanation of BCNF. For 30 points he was unwilling to help you further. Remember, we're all unpaid volunteers here, normally we charge people a lot of money to give advice and expertise.

Jeff

 

by: julia3Posted on 2003-05-28 at 02:18:54ID: 8596563

So here

relation R(a,b,c,d,e,f)  which in 2nf
a,b is p.k
fd here is
c,d -> e

so i hv here tried myself just correct w'r i am wrong if.
i a, converting it into 3nf

solution-
R1(c,d,e) c,d pk

R2(a,b,c,d,f) c,d COMPOSITE FK
is this correct.

 

by: jpkempPosted on 2003-05-28 at 20:44:02ID: 8603133

Yes, well done.

Jeff

 

by: julia3Posted on 2003-05-29 at 00:19:52ID: 8603950

But here in this case

R(A,B,C,D,E,F,G,H) G,H IS pk  WHICH IS IN 2NF

and i hv 2 FD
AB -> F
C  -> D

While changing it into 3nf

is this way

R1(A,B,F) ---------------(A,B) P.K
R2(C,D)   ---------------(C) P.K
R3(A,B, C , E, G,H) ----(A,B) F.K and C also f.k
is that the way of doing?

when there will be 2 FD i guess we have three relation rite?
or we can do it in 2 relation like previous.



 

by: jpkempPosted on 2003-05-29 at 20:37:20ID: 8611096

No, you need 3 relations, one for each set of dependencies. Your 3 relations are correct.

 

by: julia3Posted on 2003-05-29 at 23:46:41ID: 8611778

Thanx for helping me.

In this case

Relation R(A,B,C,D) has the following Functional Dependencies:

AB      ->      CD
C      ->      B

Convert R into two-or three relations, R1, R2 and R3 all in the highest possible normal form

do i hv to follow same method i bit confuse coz of word highest nf.

guide me here

 

by: jpkempPosted on 2003-06-02 at 19:36:07ID: 8634796

"highest possible normal form" is misleading and whoever wrote the question probably doesn't understand the subject very well. Obviously they mean that they wish you to normalize the design - without trying to artificially only normalize "part of the way", e.g. to 2NF or 3NF only.

Normalization is the process of removing redundancies from a relational data model. If no redundancies exist, then the design is said to be fully normalized (i.e. in the "highest possible normal form" according to your questioner). If redundancies exist, then depending on what kind they are will determine to what normal form it is in.

The method you follow depends on what works for you - but while learning it's general practice to normalize one NF at a time (i.e. remove repeating groups, remove partial key dependencies, remove non-key dependencies, resolve overlapping candidate keys, etc.). This method is something you should learn in a data modelling class.

Jeff

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...