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.
Database merge tools
Moderators: AArdvark, Ice Cream Jonsey
- Ice Cream Jonsey
- Posts: 30069
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Database merge tools
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 2544
- Joined: Tue Jun 04, 2002 10:43 pm
Re: Database merge tools
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.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.
It'll be kinda slow but if you don't have a lot of data to move it's the easy way.
Bruce