database - How to normalize a table to BCNF form -


i trying understand how normalize relation bcnf form. know definition of bcnf, , know in order normalize need eliminate every d -> x d isn't part of key candidate. , create new tables of (d,x) , (s,x).

i read threads:

  1. normalisation bcnf
  2. bcnf decomposition
  3. difference between 3nf , bcnf

but problem facing how use algorithm when x part of super key. explain:

assume have relation:

r = (a,b,c,d,e) fd = { {a,b}->{c} , {a,b}->{d} , {a,b}->{e} , {d}->{b} }  

obviously, super key (a,b). , clearly, d isn't key candidate.

d->b violating bcnf can't take b out of table since part of super key.

so question is: in case, how can normalize relation bcnf form?

answearing own question (with great of jonathan leffler):

this relation should normalize into:

r1 = (a,b,c,e). super-key (a,b). r2 = (b,d). super-key (d). 

i.e. every time scheme s have fd d->x violating bcnf:

if d isn't part of key new tables (d,x) , (s,x).
if d is part of key new tables (d,x) , (s,d).
if both d , x part of key relation can not normalize bcnf from.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -