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/jshine13371 Jul 08 '26
It's in reply to your insinuation of lack of experience from your previous comment. If you don't think experience is a relevant factor in this discussion, then don't bring it up.
Ok, so? It doesn't change the point that application layer languages also have similar quirks and issues. Your initial stance tried to put application layer languages on a pedestal above SQL. 🤷♂️
There are plenty of similar quirks in C# and any other application layer language. You're hopefully smart enough to recognize that with your amount of experience. 😘
No need to when I've already successfully responded to pretty much every point you made, and you continue to ignore that your points have been proven otherwise.
You can walk back your previous comment, it doesn't change anything.
Cheers mate!