sql - Tools to cleanup a mySQL database that is already normalized? -
i have mysql database, need cleanup data in.
i looking see if there tools clean normalized tables @ 1 time.
example:
user
table includes codesmake
,model
make
table has makes consolidatemodel
table has models consolidate
doing manually nightmare:
change references in
model
table (example delete redundant models "b" , "c", leaving model "a"now
users
referencingmodels
"b" or "c" need manually changed referencemodel
"a"
changing make
more difficult, since models
have moved remaining make
, user
tables updates, etc.
are there tools out there make simple, perhaps graphical?
presumably make
, model
each have id , description, , there several make
, model
records either identical or equivalent descriptions consolidate.
if descriptions identical, write update statement set foreign key column equal first id of primary key column based on join on description.
if descriptions not identical, create table 2 columns, containing in first column id want assign, , in second, id(s) want reassign, write update query similar above.