Unless you already have your entire database in-memory in your app, that is. In that case, why do you have a database?
Unless you already have your entire database in-memory in your app, that is. In that case, why do you have a database?
A more realistic example is, do you get Alice's pets by doing a JOIN on tables Person, Pet, PetOwnedByPerson ("SQL") -- or by having an array column "pets" in Person? ("NoSQL")
There's actually two competing philosophies on data warehousing (Inmon and Kimball), but I've only ever used Kimball's method, which favors denormalization.
http://www.computerweekly.com/tip/Inmon-vs-Kimball-Which-app...
"Normalize until it hurts, denormalize until it works."
But yeah, usually, don't be clever and don't spaff the contents of the database across a network just to do a join.
I would generalize what you say even further: The database is faster at most of the data crunching you need.