stackstash

MongoDB vs Postgres

MongoDB and Postgres are free.

A document database that stores records as JSON-like documents instead of table rows.

Try it

Pros of MongoDB

  • Add fields without a migration

  • Documents map cleanly to JavaScript objects

  • Free Atlas tier to start

Cons of MongoDB

  • Joins and reports are harder than in SQL

  • Without a schema, data drifts out of shape

  • Atlas jumps in price past the free and Flex tiers

Open-source relational database. The usual pick when you want real SQL.

Try it

Pros of Postgres

  • Reliable relational database

  • JSON without leaving SQL

  • Free to run yourself

Cons of Postgres

  • You manage backups and upgrades

  • Heavier than SQLite for a tiny app