Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I sling a lot of SQL, and, mirroring a lot of peoples sentiment here, wish it had better syntax and composability.

DuckDB and Apache spark expose nice apis that almost completely remove the need to faff around with textual strings. Each projection returns a view that can be treated like another table, so composition and reuse is simple.. It would be nice if such a thing we're more standard and available on the other dbms that I have to work with.

I feel like, in the continuum of abstraction, SQL is like opengl 3.. high level and a bit inflexible. Taking the analogy further, an ORM would be like the game engine on top of opengl.. What doesn't exist, as far as I know, is the Vulkan equivalent. A low level, api that exposes the relational algebra and exactly how to execute it. There are cases where I would have saved a lot of effort if I could just write the damned physical plan for a query execution myself rather than rearranging table join orders and sending hints that the query optimizer is just going to passive aggressively ignore anyway.



Don’t TVFs accomplish the level of composability you’re describing? They give exactly a “view that can be treated like another table”.

https://cloud.google.com/bigquery/docs/reference/standard-sq...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: