MITS Edge — Powered by MITS Group
Comparison

MySQL vs PostgreSQL

MySQLvsPostgreSQL

Learn MySQL first if you want the gentler start and expect to work with web applications. Learn PostgreSQL if you want richer SQL features, such as materialized views and indexable JSONB, or if the teams you are applying to use it. Most everyday SQL carries over between the two.

DimensionMySQLPostgreSQL
Developed byOraclePostgreSQL Global Development Group
LicenseGPL v2, or a commercial license from OraclePostgreSQL License (permissive)
JSONJSON type, stored in a binary formatJSON and JSONB; JSONB can use GIN indexes
Full outer joinNot supported directlySupported
Materialized viewsNot built inBuilt in
Window functions and CTEsYes, since version 8.0Yes
Often seen inWeb applications and content sitesApplications with complex queries, and geospatial work through PostGIS

MySQL

Choose MySQL if you are new to databases or will work with web stacks that already use it.

PostgreSQL

Choose PostgreSQL if you want advanced SQL, JSONB and extensions, or the roles you want ask for it.

Courses for each

Frequently asked questions

Is PostgreSQL harder to learn than MySQL?

The basics are similar. PostgreSQL has more features to learn once you go past everyday queries.

Will what I learn in one carry over to the other?

Mostly, yes. Selecting, joining and grouping work much the same way. Administration commands and some functions differ.

Are MySQL and PostgreSQL free?

Both have free open-source versions. MySQL also has paid editions from Oracle.

Do I need both for a job?

Not usually. Learn one well, then pick up the other when a role needs it.

Keep comparing & learning

Ready to start? Explore live online programs built for US & Canada schedules.