1 karma · joined December 13, 2019
What relational databases do is decouple such implementation details from semantics, enabling higher levels of abstraction and therefore reasoning. Similarly, I'm happy to abstract the low-levels details of dictionaries in Python and not code my own hash table from scratch, or to use a compiler and not write assembly language. And while there are inevitable corner cases where hand-coded logic will outperform what a system can guess, handicapping yourself for a few extra cycles is something routinely (and rightly) derided in most programming circles.
Nobody debates that NoSQL systems are great for hand-tuning corner cases like these. It's the idea that they are a viable alternative to the relational model that is so objectionable, as it's a step backwards in abstraction.
While normalized relational databases are indeed slower than key/value stores, they also foster data integrity and the ability to compose arbitrarily complex queries with little effort (assuming one actually groks SQL). One can always optimize trouble spots in a relational database later on (possible even with a KVS), but using a KVS from the get-go is bound to lead to pain.
If we happily use Ruby, Python, et al. while chanting the mantra of premature optimization being bad (and rightly so!), why does this not apply also to databases?
Food prices have really shot up since 2006 though; in particular, bulk beans have almost doubled. Still, I think it would be possible to eat the same diet today for around $35/week for a couple.
(Incidentally, DataMapper in Ruby doesn't in fact implement the Data Mapper pattern, which I find irritating.)
Also, I'm certainly not one to knock coffee, but tea is much better in terms of bang for the buck. I buy loose-leaf jasmine tea from an Asian grocery store, and get a month worth of tasty drinks for less than two bucks. It's healthier than coffee to boot.
"SQL databases behave less like object collections the more size and performance start to matter; object collections behave less like tables and rows the more abstraction starts to matter."
This false dichotomy that's always presented is distracting, and leads to people naively taking religious positions about what should in fact be a non-issue.
(I see you develop with Rails though, so probably yes.)
Your bad taste for relational databases is more likely a result of using a crappy ORM pattern (such as Active Record). Go try a proper implementation of Data Mapper (I can't recommend SQLAlchemy highly enough), then come back and tell me how you feel.