Performing Complex Edits of Data (Cleaning up Data)
Hi
Database designers often find themselves lumped with the job of cleaning up data may be imported from some where else. Well you can use mysql replace command to do some of the work. However for really complex stuff, I dump the database to a sql file and then modify that with vim or perl as both of them allow regular expressions.
I use my favorite MySQL GUI is www.sqlyog.com to do the saving and reloading of the data.
Database designers often find themselves lumped with the job of cleaning up data may be imported from some where else. Well you can use mysql replace command to do some of the work. However for really complex stuff, I dump the database to a sql file and then modify that with vim or perl as both of them allow regular expressions.
I use my favorite MySQL GUI is www.sqlyog.com to do the saving and reloading of the data.

2 Comments:
I agree that a dump to sql (for example using mysqldump if coming from a mysql database) followed by adjustments and cleanup with a script or vim editing (my preferred method) is a good way to do things.
But I am wondering what the import via this GUI program does for you? I find it just as easy to use the mysql command on a command line, for example:
mysql -u {username} -p {databasename} < {datafile.sql}
where the items in brackets are substituted with actual values. This invokes mysql with the permissions of user {username} using a password that will be prompted for, starting with database {databasename} and taking the input directly from the file {datafile.sql}.
By
coolsti, At
April 1, 2008 6:35 AM
Coolsti,
I agree, I've just got so used to using a GUI. I still use the MySQL CLI now and again. The GUI comes in real handy for remembering all the connection details of the few dozen databases I maintain. SQLYog also allows me to tunnel when you you have no direct access to the DB.
Dave
By
zzapper, At
April 17, 2008 10:31 AM
Post a Comment
<< Home