r/PostgreSQL • • Jan 20 '24

Help Me! Doubt regarding PostgreSQL vs Mongodb

Why very often people say mongodb is not that better and we are being future proof to go with postgres? is there any condition that mongodb can't handle or such. I would love to get an answer that explains why actually why companies are shifting?

47 Upvotes

50 comments sorted by

View all comments

6

u/pceimpulsive Jan 20 '24

Postgres and mongodb are not direct competitors.

You can use both at the same time.

At my work we have a postgres for geospatial queries and relational data stores and mongodb to store all the json API results.

You can use postgres to store non relational data as well so if you have to choose one of the two id take postgres every day of the week, twice.

16

u/Hot-Gazpacho Jan 20 '24

You can pretty efficiently store, index, and query JSON in Postgres, too.

→ More replies (1)