Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Change IBM DB2 to MySQL or PostgreSQL

Posted on 2014-04-14
Medium Priority
Last Modified: 2014-05-30
Dear Experts,

We need to convert database from IBM DB2 to MySQL or PostgreSQL,

Please give me some adivces:
-  Which opensource DB should we choose: MySQL or PostgreSQL?
-  What is the advantage and disadvantage of  these two DB?
-  What is the risks/issues when convert from IBM DB2 to MySQL/PostgreSQL?

Question by:FSOFT-SA
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
LVL 11

Accepted Solution

MajorBigDeal earned 400 total points
ID: 40000764
I much prefer postgresql over mysql.  I use it with django, nginx, and python and it works really well.   I made this considered decision years ago but I think the overwhelming consideration now is that Oracle bought mysql and is in the process of killing the open source version.   That alone is a really good reason not to go with mysql.
LVL 35

Assisted Solution

by:Dan Craciun
Dan Craciun earned 400 total points
ID: 40000815
+1 for Postgresql. MySQL is more popular and you'll find lots of code/help for it, but in my experience postgres is more stable and faster in large databases.

If you use ERP-like SELECTS (with huge JOINs) a popular choice is Firebird. I have it running at 2 of my clients with no problems so far.

LVL 27

Expert Comment

ID: 40001059
In order to give really useful advice, we'd need to know the current DB2 version/release and platform.

Then we'd need to know something about how it's currently being used. E.g., have there been numerous stored procs, triggers, etc., added to make the database enforce significant business rules? Are there lots of complex queries against the database? What are the data volumes? Are features such as BLOBs used in significant parts of the database? Is any encryption important?

A general description of the database and the application environment could really tip advice towards postgresql or keep it more with MySQL.

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?


Author Comment

ID: 40001286
Thanks all.
@tliotta: current system uses:
-  only tables & views: over 200 tables and over 100 views
-  some queries for some views are a little complex with many select and deep join
-  data volume is about over 5GB and may be increased
-  there're CLOBs and BLOBs
-  there're ENCRYPT_CHAR() , DESCRYPT_CHAR() (of DB2) when creating views

Please help.
LVL 46

Assisted Solution

by:Kent Olsen
Kent Olsen earned 400 total points
ID: 40001393

With that small a database, a better question might be why do you need to migrate away from DB2?  The free version of DB2 has some limitations compared to the paid-for licensed version, but a database your size shouldn't be affected by them.

Before undertaking a major conversion, take a look at DB2 Express-C.  It will cost the same as the open source DBMS (free) and shares a code-base with IBM's regular DB2 product.

LVL 62

Assisted Solution

gheist earned 400 total points
ID: 40003932
In postgresql you can define noop for encrypt/decrypt functions. Tables should go well, views may need some tweaking. Btw ibm has good references to ansi sql, so just get programmers working
LVL 27

Assisted Solution

tliotta earned 400 total points
ID: 40006297
Given the limited size and complexity of the database, I'd say it comes down to what the developers feel most comfortable with.

I generally prefer DB2 primarily because there seems to be more conformance with SQL standards. But that can be a problem for developers who are less familiar with SQL and who need numerous extensions.

I wouldn't expect big problems going any of the directions as long as the developers are willing.

LVL 46

Expert Comment

by:Kent Olsen
ID: 40006357
From an SQL development viewpoint, I prefer DB2 SQL simply for its date handling.  Oracle is a bit clunky, and SQL Server is just plain awful.  The ANSI parts are, of course, common.

On gotcha is that the default SQL style in MySQL is their proprietary version.  It does some nice things, but the non-ANSI portions move it even further from "standard SQL" than do the extensions used by Oracle, DB2, and Microsoft.  Unless you need those extensions, set the SQL mode to ANSI from the start.

But that kind of brings you full circle.  There's no point in changing from DB2 to a different free engine if you're going to run in ANSI compatible mode.

MySQL and DB2 are the easiest to administer.  (I assume the PostgreSQL is, too.)  I can usually talk someone through an issue on the phone.  That's usually not the case with Oracle and SQL Server.

Author Closing Comment

ID: 40100527
Thanks all for your advice.
From all of your comments, my customer chose PostgreSQL.

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question