Comment by diggan
3 months ago
> but in my opinion big SQLs are one of the best ways to store complexity.
It seems crazy at first, and then I continue thinking about it and it still seems crazy for wanting complexity to be in SQL.
Personally, I want anything complex to ideally easily testable, both manually and automatically. SQLs is easy to test manually, but harder to test automatically, especially compared to lines of code in a programming language. At least you can somewhat untangle balls of spaghetti code into less dense, then attack parts of it. How would you deal with a tangled ball of SQL spaghetti?
> The more lines the more risk for bugs.
I don't fully agree with this either, not all lines are equal. One big fat line of a 400 character long SQL query has higher chance of containing issues not easy to glance compared to 400 lines of Java code, and I say this even as a person who despises Java for various reasons.
No comments yet
Contribute on Hacker News ↗