r/SQL • u/yughiro_destroyer • Jul 06 '26
Discussion Why do we need abstractions over SQL?
When I mean abstractions, I mainly mean OOP and ORMs.
SQL is so simple and beautiful. Tables with rows and columns are easy to understand. And once you pick up the SQL syntax, you can pretty much achieve anything with queries. Not to mention that SQL is universal and works everywhere and anytime.
Then you have the software development world... where you're asked to constantly use ORMs or map records as OOP objects. Why? ORMs are limited and do not have the flexibility of simple queries. Also mapping records as objects increases bloat, reduces performance that can hurt if the application grows and is overall not as straightforward to work with.
The only good things that ORMs are doing by default are to provide data safety and prevent SQL injection. But with some minimum and basic knowledge and discipline, you can write pure queries without having those problems. Any ideas?
View all comments
Show parent comment
1
u/thatOMoment Jul 08 '26
Principal engineer here too 12 years experience and a computer science degree.
I've maintained and fixed code that was written before and a few years after I was born (Uniface and classic asp) alongside the latest angular apps with every version of .NET in the stack from 2.0 WCF to .NET core 10 with EF and just a bit of RHINO Java.
Not really sure what your experience has to do with anything in this argument, unless the implication is that the credentials add some weight to your point or somehow validate it.
And in your own response you refer to Javascript, they language written in 7 days by Brenden Eichman who has publicly, on multiple occasions said it's a terrible language and a mistake.
Who has publicly also said == was a mistake.
A language so terrible, Microsoft made Typescript to actually help allow it to scale.
So terrible they added "use strict" to make it less awful and reliable.
You're counterpoint is based on defending a language with parallel brokenness to another broken language... whose brokenness has articles about how much money was lost that aggregates into the billions due to how broken it is.
Not sure how that's an "objective" argument... unless it's an "objectively flawed" counterpoint
SQL experience is just something I have to make dbas happy, they deserve better than accountability with no authority and terrible query writters burning down their server resources.
You also didn't address any of the resources I mentioned or linked
:)
P.S. Also never said you were data analyst. Was just ranting about them.