Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With a feature like this is there still a good reason to use MongoDB?

Honest question, I know Oracle and Postges well, but not their JSON features. I'm just starting to learn MongoDB seriously because of a current project.



Not really, imo. The biggest advantage of Mongo was being able to store a single hierarchical document and search it. Now that you can do that in the RDBMS there's no advantage at all. You also throw away all capability of doing relations in the database with Mongo which is optional in an RDBMS and sometimes very beneficial.

Mongo could win if it were more performant or had a better query syntax... but it isn't and it doesn't. It might have some slight advantage in the speed you can set up a replicated cluster but you'll pay long-term in overall performance from my experience. If all you are doing is storing documents, just use an S3 bucket, etc...


IMHO, the MongoDB query language is more suitable for richly structured shapes than SQL, esp. in the area of polymorphism and arrays.


I will admit that polymorphic types can still be pretty awful in an RDBMS. And yes, juggling sets can take some creativity with SQL.


After Postgres added JSON support I couldn't get away from MongoDB fast enough. I haven't missed it.


SQL extensions for JSON in RDBMS is not the same thing as MongoDB query language on MongoDB. Try this on for size: https://moschetti.org/rants/postgresvmongo.html


A fair bit of that is out of date as it's from 2017.


To me the only really good reason to use MongoDB those days is very high data ingestion rate. It was the main reason why CERN used it in the LHC, but I don't know if that solution is still in place.


Maybe a personal frustration but I find postgres JSON operators really annoying to deal with compared to mongosh




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: