Difference between revisions of "Converting from other Databases to PostgreSQL"

From PostgreSQL wiki
Jump to: navigation, search
(Scripts, programs)
(Reordered scripts on documentation (much of it is out-of-date))
(One intermediate revision by the same user not shown)
Line 64: Line 64:
 
== MySQL ==
 
== MySQL ==
  
=== Documentation ===
 
  
* [http://www.sitepoint.com/article/site-mysql-postgresql-1 Backend Database Switcheroo Howto Part I] by Nathan Matias
+
=== Scripts, programs ===
* [http://www.sitepoint.com/article/site-mysql-postgresql-2 Backend Database Switcheroo Howto Part II] by Nathan Matias
+
 
* [http://www.xach.com/aolserver/mysql-to-postgresql.html How-To: Migrating from MySQL to PostgreSQL] by Zach Beane
+
==== 2013 ====
* [[Things to find out about when moving from MySQL to PostgreSQL]] by Joel Burton (8th April 2001)
+
* [https://github.com/lanyrd/mysql-postgresql-converter MySQL/PostgreSQL Converter from Lanyrd], based on [http://lanyrd.com/blog/2012/lanyrds-big-move/ work detailed here]
* [[Why PostgreSQL Instead of MySQL: Comparing Reliability and Speed in 2007]] by Greg Smith
+
* [http://git.tapoueh.org/?p=pgloader.git;a=summary pgloader], from Dimitri Fontaine, based on [http://tapoueh.org/blog/2013/01/28-pgloader-future work detailed here]
* [http://www.postgresonline.com/journal/index.php?/archives/51-Cross-Compare-of-SQL-Server,-MySQL,-and-PostgreSQL.html Cross Compare of SQL Server, MySQL, and PostgreSQL] by Leo Hsu and Regina Obe (2008-05-13)
+
* [https://github.com/philipsoutham/py-mysql2pgsql py-mysql2pgsql], [https://github.com/mozilla/airmozilla/pull/61/files#diff-30 example use case here]
* [[How to make a proper migration from MySQL to PostgreSQL]]
 
* [http://andreas.scherbaum.la/writings/migrate_web_platforms.pdf Migrating a community platform from Mysql to PostgreSQL] by Andreas Scherbaum (Prato, 2007)
 
* [http://okbob.blogspot.com/2009/08/mysql-functions-for-postgresql.html MySQL functions for PostgreSQL] by Pavel Stěhule
 
  
=== Scripts, programs ===
+
==== Previously ====
 
* [http://www.enterprisedb.com/products/download.do Free MySQL to Postgres Migration Wizard by EnterpriseDB v1.1] by EnterpriseDB Corporation. Available without registration via PostgreSQL installer wizard.
 
* [http://www.enterprisedb.com/products/download.do Free MySQL to Postgres Migration Wizard by EnterpriseDB v1.1] by EnterpriseDB Corporation. Available without registration via PostgreSQL installer wizard.
 
* [http://www.pgsql.com/download/ Conversion tool for migrating from MySQL to PostgreSQL] by PostgreSQL Inc.
 
* [http://www.pgsql.com/download/ Conversion tool for migrating from MySQL to PostgreSQL] by PostgreSQL Inc.
Line 99: Line 95:
 
* [https://bitbucket.org/iceone/mysql2pgsql/ my2pg.py] MySQL to PostgreSQL database conversion (not the same as above)
 
* [https://bitbucket.org/iceone/mysql2pgsql/ my2pg.py] MySQL to PostgreSQL database conversion (not the same as above)
 
* [http://phpseclib.sourceforge.net/sql/ SQL Data Definition Language (DDL) Conversion to MySQL, PostgreSQL and MS-SQL] by phpBB Group
 
* [http://phpseclib.sourceforge.net/sql/ SQL Data Definition Language (DDL) Conversion to MySQL, PostgreSQL and MS-SQL] by phpBB Group
 +
 +
=== Documentation ===
 +
 +
* [http://www.sitepoint.com/article/site-mysql-postgresql-1 Backend Database Switcheroo Howto Part I]  by Nathan Matias
 +
* [http://www.sitepoint.com/article/site-mysql-postgresql-2 Backend Database Switcheroo Howto Part II] by Nathan Matias
 +
* [http://www.xach.com/aolserver/mysql-to-postgresql.html How-To: Migrating from MySQL to PostgreSQL] by Zach Beane
 +
* [[Things to find out about when moving from MySQL to PostgreSQL]] by Joel Burton (8th April 2001)
 +
* [[Why PostgreSQL Instead of MySQL: Comparing Reliability and Speed in 2007]] by Greg Smith
 +
* [http://www.postgresonline.com/journal/index.php?/archives/51-Cross-Compare-of-SQL-Server,-MySQL,-and-PostgreSQL.html Cross Compare of SQL Server, MySQL, and PostgreSQL] by Leo Hsu and Regina Obe (2008-05-13)
 +
* [[How to make a proper migration from MySQL to PostgreSQL]]
 +
* [http://andreas.scherbaum.la/writings/migrate_web_platforms.pdf Migrating a community platform from Mysql to PostgreSQL] by Andreas Scherbaum (Prato, 2007)
 +
* [http://okbob.blogspot.com/2009/08/mysql-functions-for-postgresql.html MySQL functions for PostgreSQL] by Pavel Stěhule
  
 
== Oracle ==
 
== Oracle ==

Revision as of 18:26, 2 August 2013

Non-specific

DBase II, III, IV+

DBF Format

FileMaker Pro

IBM DB2

Interbase

Microsoft Access

  • exportSQL - a Microsoft Access module which exports Access Database into MySQL, mSQL and PostgreSQL by Dobrica Pavlinusic. Based on the work of Pedro Freire
  • MDB Tools by Brian Bruns
    • A quick way to dump all tables as tsv or csv files
for TT in $(mdb-tables file.mdb); do
     mdb-export -Q -d $'\t' -D '%%Y-%%m-%%d %%H:%%M:%%S' file.mdb "$TT" > "${TT}.tsv"
done
for TT in $(mdb-tables file.mdb); do
     mdb-export -D '%%Y-%%m-%%d %%H:%%M:%%S' file.mdb "$TT" > "${TT}.csv"
done

Microsoft SQL Server

MySQL

Scripts, programs

2013

Previously

 # To install mysql2psql (under ubuntu 11.10): No need to get from github, just:
 sudo apt-get install ruby gems libmysqlclient-dev libpq-dev
 gem install mysql pg mysql2psql
 # To get info about the mysql socket:
 netstat -l | grep mysql
 mysql2psql # creates a .yml templae
 vi mysql2psql.yml # edit the template
 mysql2psql # connects to mysql database and write into postgres database

Documentation

Oracle

Progress RDBMS

Converting PostgreSQL Databases to other Databases