4 ms·
The language tends to be more powerful and make more sense (specifically than the craziness of ORMs, not vs. query builders that often at least try to have reas
by saurik 5y ago
The language tends to be more powerful and make more sense (specifically than the craziness of ORMs, not vs. query builders that often at least try to have reasonable semantics), and despite most of my friends who love ORMs seemingly having to keep re-learning how to use a database every few years due to whatever platform fad everyone is rabid about (both due to shifting frameworks and libraries), my knowledge of SQL has managed to just get stronger over the past quarter century of my using SQL. The mental model you get from actually specifying the query you want is also, I will claim, really important: I believe it helps you decide on what the correct API even is to access your data, such that when you later attempt to add abstractions or move the bits around to different machines/locations, it becomes easier to manage.
I'll make a second (though I do believe "weaker" point): you are frankly likely to want to port your entire project at some point to some new framework / language, and if most of your system's behavior is just gluing SQL statements together with input models, that's going to be super easy. (The counter-argument, meanwhile, always feels really lame to me: "you might want to change your database at some point". Not only do people effectively never do that, but somehow even projects that use ORMs almost never achieve true database agnosticism either. Meanwhile, such a change is something that seems to come up a lot less often than "the awkward framework I'm using is now considered deprecated", in the grand scheme of things that are almost no database solutions that have ever mattered anyway, and the differences between them are sufficiently small vs. the differences between ORM framework concepts that porting has never felt like that big of a deal, unless you are literally going all-in on some database-specific component in which case there was likely a reason you were doing that and the ORM likely wasn't going to be useful anyway.)