Hacker News new | ask | show | jobs
by da39a3ee 1751 days ago
I've done backend web development with a relational DB via an ORM for 10 years. I'm OK at that, but I'm fucking hopeless at SQL. I know that my opinions are thus undermined, but I really wish we could get rid of SQL and replace it with something like logica [1] like today.

SQL's pseudo-natural language syntax is an embarrassment and its lack of composability is even more of an embarrassment.

[1] https://opensource.google/projects/logica

1 comments

Have you used CTEs much (aka the WITH statement)?

I find them to be a huge step forwards in terms of adding composability to complex queries.

Yes I concur: CTEs is closer to the spirit of relational algebra: every step/expression should yield a table/relation.

As data munging is about combining/correlating/sorting/grouping data, why not have a sound (bag) algebra to do that? Such algebra would give us equational reasoning, proofs, etc.

And consequently: students would be learning an algebra which is easier to learn IMO.

Thanks yes I have learned to use the WITH statement, and I agree it gives more composability. But still, a half way house wouldn't you say?