Difference between MySQL and PostgreSQL

By Jaxson

Main Difference

MySQL is a relational database management system RDBMS. PostgreSQL is an object relational database management system (ORDBMS). MySQL is developed by Oracle and PostgreSQL is developed by the PostgreSQL Global Development Group. MySQL’s free versions are available under GNU General Public License and commercial versions are also available under the GNU General Public License while PostgreSQL is available under PostgreSQL License. Both of the MySQL and PostgreSQL are open source. There are many differences between MySQL and PostgreSQL on the basis of governance, supported platforms, access methods, partitioning and replication.

MySQL

MySQL is a relational database management system (RDBMS) which is developed by Oracle. It is an open source. MySQL’s free versions are available under GNU General Public License and commercial versions are also available under the GNU General Public License. MySQL focuses on read-mostly web applications usually written in PHP.

PostgreSQL

PostgreSQL is an object relational database management system (ORDBMS) and is available under PostgreSQL License. It is developed by the PostgreSQL Global Development Group. PostgreSQDL is closer to the ANSI SQL standard. PostgreSQL focuses on reliability, data-integrity and integrated developer-focused features.

Key Differences

  • MySQL is a relational database management system RDBMS while PostgreSQL is an object relational database management system (ORDBMS).
  • MySQL is developed by Oracle and PostgreSQL is developed by the PostgreSQL Global Development Group.
  • MySQL uses MySQL partitioning technology for storing data on different nodes of database while PostgreSQL does not implement true partitioning.
  • Partitioning is done in MySQL for performing horizontal clustering while in PostgreSQL similar capability is done by table inheritance.
  • Performance of MySQL is faster as compare to PostgreSQL.
  • Sub-selects are available with PostgreSQL but not in MySQL.
  • Foreign key support is available in PostgreSQL but not in MySQL.
  • Triggers are available in PostgreSQL but not in MySQL.
  • Unions are available in PostgreSQL but not in MySQL.
  • Constraints are available in PostgreSQL but not in MySQL.
  • Vacuum (cleanup) are available in PostgreSQL but not in MySQL.
  • PostgreSQDL is closer to the ANSI SQL standard while MySQL is not fully compliant with ANSI SQL.
  • Database design is simpler in MySQL as compare to PostgreSQL.

Video Explanation

Leave a Comment