3 ms·
Every time I've found myself frustrated with a SQL query, there was some horrible misstep in how the underlying schema was designed. Having the wisdom to craft
by bob1029 2y ago
Every time I've found myself frustrated with a SQL query, there was some horrible misstep in how the underlying schema was designed.
Having the wisdom to craft a high quality schema can be the biggest unlock in the whole enterprise. If the tables, columns & relations are ~1:1 with the actual business (i.e., you went and talked to real, live stakeholders at design time), then it should be deeply intuitive for a non-technical domain expert to interact with.
Often, you don't get a chance to redo the whole thing, but that doesn't mean you can't still design an ideal schema and then shim it with views, CTEs, replicas, ETL, etc.
SQL is a domain specific language. It would be like complaining about how horrible it is to write Lua scripts. The criticism is baseless without understanding the underlying schema/bindings.