MySQL/PHP Database Normalisation -
im working amongst group of fellow students creating relational mysql database used in conjunction php.
we attempting normalise database , differing in opinion. when normalising , creating new table 2 of group, myself included feel best practice foreign key left behind in existing table unique identifier in new table becomes new pk.
the remainder of group have been taught/feel should implemented other way, i.e. primary key left behind.
could case long relationship present job, or case 1 method correct on other.
thanks in advance
gary
this depends on doing. when removing partial dependency rule is:
r = (a, b, c, d) , b makes composite primary key , c dependent on r1 = (a, c) r2 = (a, b, d)
if removing transitive dependency then:
r = (a, b, c) primary key , c dependent on b r1 = (a, b) r2 = (b, c)
Comments
Post a Comment