3 ms·
"No composability or code reuse" is definitely a valid criticism of SQL. Check out the very first example of my personal project https://docs.racket-lang.org/pl
by default-kramer 5y ago
"No composability or code reuse" is definitely a valid criticism of SQL. Check out the very first example of my personal project https://docs.racket-lang.org/plisqin/Read_Me_First.html https://docs.racket-lang.org/plisqin/Read_Me_First.html and let me know how you would implement something akin to `(CategoryName p)` and `(TotalSales p)` in SQL. A view does not count, because then you either have one view per derived field and that is very cumbersome to consume, or you have one view with all the derived fields and you will end up paying performance costs for fields that you are not using.
- ok123456 5y agoDon't views and materialized views give you reuse? Can't you do composibility with foreign references?
- neurocean 5y agoSure, while views may be fine for small projects, using them for larger projects like data warehousing is usually a mistake you'll come to regret. SQL views are rarely unit tested so you always end up in a regression nightmare when you need to make updates. If you're going to go pure SQL, you should use something like dbt.