Wednesday, April 10, 2013

MySQL vs PostgreSQL

The "M" in LAMP stands for MySQL, but there are other database management systems that can be used too. Another big open-source one is PostgreSQL. Like MySQL, it is available on a wide range of platforms, including Linux, FreeBSD, Solaris, Windows, and Mac OS X. I'm going to try and give a very high level overview of some of the basic advantages and disadvantages of each.


I have more experience with MySQL, but I have used both before. MySQL labels itself as "The most popular open source database," while PostgreSQL calls itself "The world's most advanced open source database." Those labels themselves give a little bit of insight into how the two differ on a very high level. Historically, MySQL's top priorities have been ease of use and performance, while PostgreSQL has maintained data integrity and security as its top priorities. As a result, the common opinion seems to be that MySQL is easier to use and is fast for applications like a website. On the other hand, the public opinion seems to be that PostgreSQL is more challenging, but offers more advanced features and can be more reliable, although it can be slower for simple queries. Both have good support in PHP.

If you want to know about the more in depth differences between the two, here are some comparisons of them I found:

Based on what I know, I think both database management systems are very capable of handling anything the average website will throw at them. It seems like it all comes down to what you're more comfortable working with.

1 comment: