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 codes make , model
  • make table has makes consolidate
  • model table has models consolidate

doing manually nightmare:

  1. change references in model table (example delete redundant models "b" , "c", leaving model "a"

  2. now users referencing models "b" or "c" need manually changed reference model "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.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo