Page 1 of 1

Database merge tools

Posted: Tue Jan 18, 2005 10:25 am
by Ice Cream Jonsey
I've got two databases I want to merge, one a Postgresql and one a MySql (I know more capital letters are involved, but my tolerance for them is low). Any of you guys ever do something like that?

My plan was to determine what fields are where in the Postgre one and then write a Perl script to go line by line and create the appropriate INSERT INTO commands for the MySQL dump. I then rebuild the database that way.

Would that be an OK way to go about it? I just have to think someone has already had this problem before and solved it, but if so I can't find the tool to do it.

Re: Database merge tools

Posted: Wed Jan 19, 2005 7:42 pm
by bruce
Ice Cream Jonsey wrote:My plan was to determine what fields are where in the Postgre one and then write a Perl script to go line by line and create the appropriate INSERT INTO commands for the MySQL dump. I then rebuild the database that way.
That'll work. If you use the Perl DBI stuff it'd be pretty easy too--no need to create your own INSERT statements, I don't think.

It'll be kinda slow but if you don't have a lot of data to move it's the easy way.

Bruce