I've found it useful in storing and querying JSON documents. Basically, scraping an API (for me it was an OpenTripPlanner instance I had set up) and then being able to query any property in the data very easily. But I didn't use joins, nor was this anywhere near a production server. From my understanding, if you have a heavy requirement for joins then you just shouldn't be using MongoDB in the first place. It isn't a…
I have come to the same conclusions, for that reason I asked this question, one of the reasons that i like mongodb is that data is in JSON
Ask HN: Why use MongoDB?
11–17 of 17 posts
Re: Ask HN: Why use MongoDB?
#12- flexible document schema reduces migration complexity greatly, really important when we have our software deployed on many customers sites. - flexible schema is also important to our product because we support custom forms and fields. - the ability to store and search nested data - replication is easy to setup - easy to maintain, good export formats - no dependence on customer's DBAs - no more frustrating explain-plan debugging of underperformant joins - text search (simple yet useful) - regex support - fast, up to 3x faster than SQL based engines for our use cases. - works well as a cache - decent also as a work queue with tailable capped collections.
Our biggest complain: the lack of transactions combined with data denormalization pitfalls is a PITA to work around in code.
Overall just a great db for when you need a flexible schema.
Re: Ask HN: Why use MongoDB?
#13Re: Ask HN: Why use MongoDB?
#14Re: Ask HN: Why use MongoDB?
#15What language are you writing your project(s) in? If you are using Node you should use Mongoose and then you may see why some people love Mongo. Complex queries and joins (not technically called joins I guess) are incredibly easy to accomplish with that module[1]. Personally, I have migrated back to MySQL since I was unable to convince my colleagues that Mongo would last long-term and frankly I am not 100% confident…
What would be your plan for ensuring referential integrity when working with MongoDB?
Essentially you end up with an a lot of linking by item IDs as you would with a traditional relational database but the "eventual consistency" was where I thought there may be issues in the future.
I personally never saw problems stemming from this but my projects using MongoDB never really even hit a million objects in a single collection (not 100% sure on that). Again, at scale is where I'd lose confidence.
This is entirely speculation but when it comes to critical infrastructure I can't leave anything to chance.
Re: Ask HN: Why use MongoDB?
#16Earlier quoted context omitted.
I have come to the same conclusions, for that reason I asked this question, one of the reasons that i like mongodb is that data is in JSON
Postgres is getting there, with JSON columns. You can do hstore if you like key-value, or mix it with plain old SQL tables. This combination works well for me.
And if I want to attach non-kv data like last_updated, or have foreign key relationships between one dict() and some other stuff like the corresponding user record's primary key - it's already in an RDB.
Re: Ask HN: Why use MongoDB?
#17I've found it useful in storing and querying JSON documents. Basically, scraping an API (for me it was an OpenTripPlanner instance I had set up) and then being able to query any property in the data very easily. But I didn't use joins, nor was this anywhere near a production server. From my understanding, if you have a heavy requirement for joins then you just shouldn't be using MongoDB in the first place. It isn't a…
I have come to the same conclusions, for that reason I asked this question, one of the reasons that i like mongodb is that data is in JSON