-1

Hey I am working on an example problem where I have to identify which of this relations given are in 3NF/BCNF.

These are the relations:

R1(A,B,C,D,E)

F=(CE->ABC, AB->C, C->A)


R2(C,D,E,G)

F=(CD->GE, E->D)


Now according to the answers R1 is in 3NF and R2 is in BCNF, Which in both cases I fail to see why.


How can R1 be in 3NF if the rules are either :

X -> A, then A is a subset of X

X is a superkey

A is a part of some key for R


and in R1 there is C->A = A is not a part of a key, C is not a superkey and A is clearly not a subset.


And for R2 the rules for BCNF are :

X → Y is a trivial functional dependency (Y ⊆ X)

X is a super key for schema R


and E->D = E is not a superkey nor D is a subset of E.

Are the answers wrong or am I missing something?

Thanks alot!

user3467713
  • 131
  • 1
  • 11
  • 1
    What do you think the candidate keys are for R1? For R2? – Mike Sherrill 'Cat Recall' Jan 26 '15 at 18:49
  • I think I got it actually =S for R1 the candidate key I was missing is ABE right? But for R2 I still don't see how it is BCNF as there is E->D – user3467713 Jan 26 '15 at 19:46
  • ABE is not a candidate key for R1. (Hint: Try to determine D.) You can't determine a relation's normal form until you can determine *all* its candidate keys. (That's what determines prime and nonprime attributes.) – Mike Sherrill 'Cat Recall' Jan 26 '15 at 21:01
  • Oh yea, I meant ABDE is a candidate key. Isn't it? and then A is a subset. but I'm still confused over R2. No idea how it is in BCNF. – user3467713 Jan 27 '15 at 04:55
  • ABDE isn't the *only* candidate key . . . – Mike Sherrill 'Cat Recall' Jan 27 '15 at 05:10
  • Sorry I know what the problem was and why I thought ABE was they key... It's because I copied it wrong. It was CE-> ABD not ABC. Anyways I got why R1 is in 3NF. Still don't get why R2 is in BCNF. – user3467713 Jan 27 '15 at 08:41
  • Edit your reasoning ad CORRECTIONS into the question. – philipxy Jan 31 '15 at 22:43
  • What is an F is in your question? *All* the FDs that hold? *Some* of the FDs that hold? A *cover* for the FDs that hold? A *minimal cover* for the FDs that hold? Find out what those mean. Find out what your Fs are. What *exact definition* are you using for each of 3NF & BCNF? *Which of the preceding notions of F* does each use? What *exact method* are you using to *determine* whether a NF holds? What *exact definition* of CK are you using? How do you use one of the preceding Fs to *determine* the CKs? – philipxy Jan 31 '15 at 22:54

2 Answers2

1

R1(A,B,C,D,E)

F=(CE->ABC, AB->C, C->A)

Now, as you didn,t tell about the primary key so lets find out the primary key first. and the primary key is DCE. According to me in C->A , C is not super key and A is not prime attribute. So it is not in 3NF.

R2(C,D,E,G)

F=(CD->GE, E->D) primary key is CD.

now, in E->D, E is not a super key thats why it is not in BCNF.

so it means that the book has some misprint and your answers are ok.

Bhavya
  • 53
  • 1
  • 8
1

The first relation R1 has only one candidate key CDE which means it has three attributes (C,D,E). The FD's of this relation does not satisfy the BCNF and 3NF conditions as the 3NF says the if the FD is of the form A->B, then either A should be a super key or if A is not a super key then B must be a prime attribute. Now the FD's of the R1 doesnt satisfy these conditions, so itis not in 3NF. The second relation R2 has two candidate keys CD and EC which means it has three prime attributes (C,D,E). The first FD CD->GE satisfies the BCNF conditions, so it is in BCNF and the second FD E->D(as E is not super key, so we check the B for primary attribute which in this D is). So the relation is in BCNF and if it is in BCNF then it will be in 3NF for sure.

Shantanu
  • 331
  • 2
  • 21