sql - Trying to get a third normal form -


i edited question make more understandable:

i got tiny problem , don't know how handle it.

lets got table following attributes , values want transform third nf. table created automatically machine:

keyid | action | class | method | storenr. | country  1 | action1 | class1 | method1 | 123 | gb  1 | action2 | class2 | method2 | 123 | gb   2 | action5 | class5 | method5 | 335 | null  2 | action8 | class8 | method8 | 335 | null  3 | action2 | class2 | method2 | null| nl  3 | action5 | class5 | method5 | null| nl  4 | action4 | class4 | method4 | null| null  4 | action1 | class1 | method1 | null| null 

as can see attributes keyid, action, class , method cant null. storenr , country can null.

the dependencies following:

method -> action action -> class storenr -> country 

my problem keyid. randomly created number serves purpose of tracking useractions. wouldnt there keyid impossible kind of actions user4 used in session.

i dont know how handle when putting table third nf.

i hope made needs more clear :)

regards thomas

your stated set of dependencies

method -> action action -> class storenr -> country 

and sample data suggests @ least 6 relations, follows. depending on intended nulls in sample data may simpler making it. nulls not need part of stated business requirement or fd - merely technical feature of implementation have created.

r1 {method,action} key {method} r2 {action,class} key {action} r3 {storenr,country} key {storenr} r4 {method,keyid} key {method,keyid} r5 {method,keyid,country} key {method,keyid} r6 {method,keyid,storenr} key {method,keyid} 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -