Hacker News new | ask | show | jobs
by rubymancer 492 days ago
Three times now I've argued strenuously against using MongoDB and Elasticache as the primary data store in an app, as they will inevitably turn into relational databases.

They did.

For Mongo going to postgres went great, but for complicated reasons we're stuck with Elasticache forever on our main product.

1 comments

The only reason to ever use a non-relational db is for scalability and performance reasons. Joins and transactions are hard to do correctly and efficiently in a distributed system. So “NoSQL” solutions can be a good fit if your data is too big to fit on a single host and you can get by without joins and transactions.

(This is a massive oversimplification, but still used rule of thumb.)

> if your data is too big to fit on a single host

And most companies vastly overestimate their data, and believe it to be "big", when it could be trivially handled decades ago by server-grade hardware.

> The only reason to ever use a non-relational db is for scalability and performance reasons.

And, most importantly, lack of market availability. Nobody is going to sell you a relational database nowadays, and rolling your own is... daring. Postgres was the last serious kick at a relational database, but even it eventually gave into becoming tablational when it abandoned QUEL and adopted SQL.

But tablational databases are arguably better for most use-cases, not to mention easier to understand for those who don't come from a math background. There is good reason tablational databases are the default choice.