Database merge tools

Video Game Discussions and general topics.

Moderators: AArdvark, Ice Cream Jonsey

User avatar
Ice Cream Jonsey
Posts: 30069
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Database merge tools

Post 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.
the dark and gritty...Ice Cream Jonsey!

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Re: Database merge tools

Post 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

Post Reply