An Executive Guide to Understanding PostgreSQL and MySQL

garyorenstein
4 min readDec 22, 2018

--

MySQL and PostgreSQL have remained two of the most popular databases for decades, in part because they are open source, and in part because they are both great products. Along with Oracle and Microsoft SQL Server, this quartet of databases dominate the data landscape and are important for any technology executive to understand.

And while you might think that an open source database is an open source database, there are a few fundamental differences between PostgreSQL and MySQL that can help architecture and IT leaders plan their database system chess moves.

But first a quick history.

MySQL

MySQL dates back to the mid 1990s. According to Wikipedia

MySQL was created by a Swedish company, MySQL AB, founded by David Axmark, Allan Larsson and Michael “Monty” Widenius. Original development of MySQL by Widenius and Axmark began in 1994.

MySQL expanded on the relational database management system by creating a developer friendly database which was widely adopted into the standard Web 1.0 technology stack. At that time, most web applications started with the “LAMP” stack, for Linux (the operating system), Apache (the web server), MySQL (the database), and PHP (the web application programming language). The LAMP stack became a prevalent technology architecture in the late 1990s through 2000s and in turn made MySQL one of the most popular databases for application developers.

PostgreSQL

PostgreSQL dates back much further to the early 1980s. According to Wikipedia,

PostgreSQL evolved from the Ingres project at the University of California, Berkeley. In 1982, the leader of the Ingres team, Michael Stonebraker, left Berkeley to make a proprietary version of Ingres. He returned to Berkeley in 1985, and started a post-Ingres project to address the problems with contemporary database systems that had become increasingly clear during the early 1980s. He got the Turing Award in 2014 for e.g. these projects and techniques pioneered in them.

Whereas MySQL became the database du jour during the Web 1.0 boom via the LAMP stack, PostgreSQL enjoyed much less notoriety. However the database robustness made PostgreSQL the tool of choice for a select and loyal group of database practitioners. We’ll cover how those differences evolved next.

Understanding MySQL and PostgreSQL

De facto market positioning

Over the years, MySQL and PostgreSQL have evolved into distinct positions. Based on my personal experience, here are a few. This is hardly definitive, and others may perceive things differently.

Primary audiences

For MySQL, a primary audience during its boom was web developers working in the LAMP stack or similar. Their charter was to build fast and scale easily. MySQL won on the first, it was also able to scale enough through the use of sharing and memory layers on top like Memcache.

For PostgreSQL the appeal was towards a wider range of database use cases, including enterprise applications that may or may not have been ‘web facing’. The result was a more stringent approach to building and supporting the database. For example, PostgreSQL is known to have a stricter interpretation of ANSI SQL compared to MySQL.

Developer base

With a friendly database for web applications, MySQL reaches a large audience of new database developers seeking easy and simple. This has led to an enormous developer ecosystem.

PostgreSQL has a narrower appeal and therefore a smaller developer base.

Primary workloads

MySQL became the transactional engine for web applications and it did so reasonably well. MySQL had less of a focus on analytics in its early days, although elements of the MySQL community have gone on to add more analytical capabilities.

PostgreSQL has always focused on the transactional component of database workloads, but because of the SQL implementation, it also served analytical workloads well. Later on PostgreSQL power ed a wave of data warehousing companies.

Market movements

Interesting market shifts surround both databases.

In 2008, Sun Microsystems acquired MySQL, and appeared to be a good fit for the database. But then in 2009, Oracle acquired Sun, and it was big news that the largest provider of commercial databases was going to acquire the world’s most popular open-source database.

The Oracle and MySQL chatter was fun to watch because although one could mildly argue that there was overlap, the open-source challenger to Oracle was always more PostgreSQL than MySQL.

The best public example of this is the every-few-year chatter that Salesforce is going to abandon Oracle in favor of a homegrown investment in PostgreSQL. The drama between the company leaders is fun to watch and perhaps nothing more than a negotiating tactic. But the threat is always made with PostgreSQL not MySQL.

PostgreSQL also set the foundation for a wave of data warehousing companies in the mid 2000s. All of them were inspired by PostgreSQL and used elements of PostgreSQL in their solutions. Then all of these PostgreSQL-inspired data warehouse companies were acquired in 2010 and 2011, IBM bought Netezza, HP bought Vertica, EMC bought Greenplum, Teradata bought Aster Data Systems, and AWS licensed technology from ParAccel to become Redshift.

That expansive footprint in the data warehousing world has made PostgreSQL the analytics leader between the two, and MySQL the low-cost transactional database. While MySQL has expanded, especially under the guidance of a new entity, MariaDB, set up by the original MySQL founders, it has not achieved the same analytic robustness seen in the PostgreSQL-inspired solutions.

Making the Right Choice

MySQL and PostgreSQL will have a long run ahead. This is validated in part by the emergence of AWS Aurora, the popular relational database service that comes in both MySQL and PostgreSQL-compatible versions.

But each choice has its place in the framework of an overall data management strategy. MySQL with a larger base and ecosystem will likely be a better choice for the rapid development of web applications. PostgreSQL will likely be a better choice for easy compatibility with a wide array of data warehouses, and a focus more geared towards analytics. PostgreSQL will also have a place in transactional applications and ultimately developers choose the tools they enjoy.

--

--

garyorenstein
garyorenstein

Written by garyorenstein

On technology, photography, fun.

Responses (1)