Comment by oarabbus_
7 years ago
>The questions we often hear are “Why create a new query language?” and “What’s wrong with SQL?”. This post contains answers to both.
Ah, I can already tell I'm not going to like this article.
>lack of proper orthogonality — SQL is hard to compose;
Their reasoning: "The difference in structure is large enough to make any sort of source-level query reuse impractical."
This is blatantly false. The second example in the article using the join covers both the single-row and multi-row result cases. Additionally, SQL can be made very reusable and modular using tools like DBT, or within a DB using views or other constructs.
>lack of compactness — SQL is a large language;
It's certainly smaller in the keyword set than almost any other computer language I have used. This is like saying "It's a very cold day in the Sahara desert" when the temperature is 40C/105F.
>lack of consistency — SQL is inconsistent in syntax and semantics;
Is it? Or do people take liberties with their implementations? There is an SQL Standard and Postgres is compliant to it. Other databases not being fully ANSI SQL compliant is the fault of the DB creators, not the fault of SQL.
>poor system cohesion — SQL does not integrate well enough with application languages and protocols.
It is a relational language designed to be used within a relational database. Do the authors also complain that their screwdrivers are very inefficient at cutting meat?
They're onto something with the trickiness of NULL, but there have already been tons and tons of discussions on Hacker News - anyone with database experience, either analytical or transaction, will tell you that imagining a NULL-free world actually creates more problems then it solves.
I found this to be a highly misinformed article, personally; really it's a marketing ploy for their proprietary language. Just like most other "we have our own query language better than SQL" product, it probably isn't.
Thanks for the DBT tip. I've always wanted composable SQL statements but never known how to achieve it.
https://docs.getdbt.com/docs#section-what-makes-dbt-so-power...
We've started using DBT at my office for ETL into our data warehouse and it's a godsend. Being able to add tests to tables and views, built in documentation support, built in DAGs are all great, and the folks at Fishtown who make dbt are super responsive on their community slack channel. (Also it's open source.)
One pain point is the integration of non-SQL (e.g. Python) jobs into the flow. DBT only manages SQL scripts, so you can lose some of the elegance when you have to glue some external jobs to it. That being said, the development is pretty rapid and as I mentioned the support is great, so I'm excited to see where they go.
Agreed on most points, but not the keywords. SQL has hundreds of keywords.
Ah, you're correct. From the querying side, there's a couple dozen that you need to know. Different personas would only need to know a small subset but it's certainly true the list of keywords itself is large.
No SQL is not a relational language.
Which is precisely why "better" is both possible and desirable.
And which is also why either of forward and backward "compatibility", to the fullest 100% extent, is intrinsically and inherently impossible.