Difference Between MySQL vs. PostgreSQL

Advertisement

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.

Advertisement

What is 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.

What is 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

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

Comparison Video