> you dont need unit test if you table design is clean, because SQL operators are deterministic and are tested by the RDBMS vendor
Imagine well structured tables in 3rd normal form.
And then a view which joins 20 tables and creates a report with myriad of case/then expressions.
Many things can go wrong. (Wrong join conditions, duplicate rows, omitted rows, wrong formulas)
You might say that there should be no such logic in database and I understand the sentiment, but circumstances (e.g. performance) might say it’s needed.
Imagine well structured tables in 3rd normal form.
And then a view which joins 20 tables and creates a report with myriad of case/then expressions.
Many things can go wrong. (Wrong join conditions, duplicate rows, omitted rows, wrong formulas)
You might say that there should be no such logic in database and I understand the sentiment, but circumstances (e.g. performance) might say it’s needed.