I always hit come sort of limitation and come back to Postgres.
One day I'll just stop betting against Postgres, but I really do want to give some of those graph databases a try just for fun.
I always hit come sort of limitation and come back to Postgres.
One day I'll just stop betting against Postgres, but I really do want to give some of those graph databases a try just for fun.
It baffles me a bit that CouchDB isn't more popular and that people rather use MongoDB for NoSQL, which doesn't come with the same syncing capabilities.
Agreed, it should be.
> and that people rather use MongoDB for NoSQL
I don't see why people would rather use MongoDB for anything, but that's just me.
> which doesn't come with the same syncing capabilities.
This is the main reason. CouchDB is amazing if you need to sync, but, if you don't, you may be better off using something else (like Postgres).
How does CouchDB handle conflicts, by the way?
Some hilarious bugs included a "relationships" collection that stored a record's identifier and an array of all the other documents it was related to. It was intended to be used for "joins" (yeah, I know). As the system grew and some customers created tens of thousands of records, all of which belonged to them so were represented in this collection. Eventually, the max array size in MongoDB was hit, which failed silently, rendering all of the data worthless.
I spent much of my time creating a roadmap for them to migrate to PostgreSQL.
I'm not blaming MongoDB here, it was just the wrong tool for that job. But some companies ate up through marketing material and thought it was the solution to all their problems.
I think that the original thinking was along the lines "well, we do not know what structure the data will have yet"
Failing silently is almost never the right thing to do.
I am not in any way related to mongodb, nor do I really like it.
That being said, I can't image they failed silently. Much more likely that some return code from an insert was ignored in the application.
Otherwise that would be just the mother of all errors of DB development.
However, I do recall many questionable things like:
- Some sort of fast but in the worst-case inconsistent default config
- In order to execute the command to free space (which you had to do regularly) you'd need to have lots of free space
Both issues are probably 5 years old, so I also don't remember any details. Migrated to postgres a year later or so.
That's the deadly combination.
If it was MongoDB + experienced developers who picked it out of careful consideration things would be different. But you never see that because experienced developers are smart enough to pick Postgres instead.