Kind of makes me unsure if it’s going to be the right choice.
Kind of makes me unsure if it’s going to be the right choice.
Just pick postgres. If you have unstructured data as input, either put in the effort to create some kind of schema for it if you can or just use jsonb if you can’t.
Are you basing this opinion on:
- popular HN opinion
- issues that Mongo experienced in its infancy
- mis-modelling highly relational data on a non-relational DB, and blaming the DB for ensuing problems
Or are you basing it on extensive experience with wide range of use cases?
This post could just be “can you explain your experiences that have lead you to this conclusion” and we’d all be better off.
MongoDB is only a valid choice if all you're doing is story key document pairs. The moment you need joins or any sort of aggregations like count/sum e.t.c - Mongo perf is horrendous. Postgres runs circles around Mongo in every way.
With jsonb columns, not much is lost. SQL is a huuuuge bonus. Mongo query language is a giant pain for everyone on team to learn and manage.
Nowadays, PostgreSQL has JSON/JSONB types, a full suite of extensions like pgvector and PostGIS, and I can scale with Citus or use it in any of the big managed clouds.
From a functionality perspective, MS SQL Server makes a more compelling alternative to me simply by way of its native graph database support.
Plus all the Mongo horror stories from people who I know and hold in high esteem. And recently talking to a data person explaining what a pita getting data out of their Mongo monstrosity into a format adequate for analysis.