3 ms·
You could use views. Although personally I dislike adding this layer of obfuscation. Generally devs are very underskilled in SQL (relative to it's importance) a
by vp8989 8y ago
You could use views. Although personally I dislike adding this layer of obfuscation. Generally devs are very underskilled in SQL (relative to it's importance) and ORMs hiding the SQL IMO is one of the reasons why.
There is great value in having the entire SQL easily visible in your source code. If there is a performance issue with a specific query my app is running, I can very quickly pull it out and into a database IDE and see what's going on using the more detailed tools available (REPL, execution plan/statistics usage analysis etc).
If the query is composed from a bunch of ORM function calls, I have to step through the program to first generate it.
Reducing friction around debugging allows your devs to become more capable in fixing things or making them work better, and SQL is no exception to that.
- ako 8y agoViews are not a layer of obfuscation. They are a layer of abstraction...