-1

I read in a book : "BCNF can be violated only when table contains more than one candidate key." Consider the following example: Sn Rollno Name Game 1 u11co098 Robert Basketball 2 u11ce034 Bob Cricket 3 u11co098 Robert Cricket 4 u11me049 Hogart Volleyball

From above table it can be seen that Sn is a primary key FDs Rollno -> Name Sn -> Rollno, Name, Game Now according to statement above table is in BCNF form as it has only one primary key or candidate key. Isn't FD Rollno -> Name violating BCNF? (As Rollno is not a candidate key)

philipxy
  • 14,867
  • 6
  • 39
  • 83
Maverick
  • 215
  • 1
  • 2
  • 14

1 Answers1

0

First of all, your posted relation is not in 3NF cause there exist a transitive dependency like

Sn -> Rollno, Name, Game

so sn -> rollno and Rollno -> Name

We need to decompose the schema like below

R1(Sn, Rollno, Game)

R2(Rollno, Name) 

A candidate key is a key which uniquely determines all other fields; but the one which been selected to act as primary key becomes PK.

Defn: A table is said to be in BCNF if it don't have any overlapping candidate key

Now both relation R1 and R2 are in BCNF.

Rahul
  • 76,197
  • 13
  • 71
  • 125