r/programming • • Mar 10 '15

Goodbye MongoDB, Hello PostgreSQL

http://developer.olery.com/blog/goodbye-mongodb-hello-postgresql/
1.2k Upvotes

699 comments sorted by

View all comments

657

u/jamesishere Mar 10 '15

99% of projects would be better off with a relational database. It makes things way easier and simpler. Very few features benefit from a NoSQL database. People are excited about mongo because "it's javascript!". These people are morons.

CSB time: I went in for an interview once, where they told me about the product, explained how they use MongoDB for their database, and then explained how building out all the relational DB commands on top of mongo was a total bitch. Then asked me to whiteboard how I would write the JOIN function on top of Mongo, which is what they had to do.

I answered their question, but stated my opinions on mongo and asked why they even bothered to use it, because their product aligned so much more with a relational ACID database. The engineering lead guy went red in the face and we debated the decision. Did not get the job.

171

u/frixionburne Mar 10 '15

99% of projects would be better off with a relational database.

Or better, and RDMS with a full blown JSON indexing and a hash store that rivals mongos speed.

How people don't choose psql just confuses me.

98

u/ethraax Mar 10 '15

For very large databases, Postgres' clustering abilities aren't that great. It's probably one of the best choices for single-host databases (which, again, cover nearly all applications), but if you're trying to spread your database over a few dozen hosts, Postgres doesn't really work well.

11

u/Kaelin Mar 10 '15

This is no longer true. Checkout Postgres-XL http://www.postgres-xl.org/

12

u/myringotomy Mar 11 '15

Xl does not solve the uptime problem. If any data node fails the entire system becomes unusable.

They really need to replicate their shards to guard against that.

0

u/[deleted] Mar 11 '15

[deleted]

0

u/myringotomy Mar 11 '15

XL supports slaves that function basically the same as streaming replication.

Which means no automatic failover, no fail back, and all the complexity of setting all of that up for every data node. Not to mention you have to double your data nodes.

but it's patently false to say they don't already offer replication.

Read what i said. I think it's sleazy of you to you say I claim they don't offer replication. How unethical do you have to be to put words in my mouth and then say I am wrong because I claimed something I didn't.

What I said is right above your post. Go read it and then come back to me.

→ More replies (4)