Live data from Hacker News

SQL looks like English is a well intentioned error

github.com

11–20 of 24 posts

Re: SQL looks like English is a well intentioned error

#11
While interesting, it's hard to identify any component of the author's argument that isn't fundamentally flawed.

Ambiguity is not "the true advantage" of natural language and certainly not one we want a query language to adopt.

Pointing to the limits on the complexity of SQL queries most business folks can write overlooks the fact that there are SQL queries that most business folks can write.

Wanting to make SQL more procedural is a terrible idea, for all the reasons already expressed more eloquently in this thread than I can.

Re: SQL looks like English is a well intentioned error

#13

The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra, enables set-based operations, distinct from procedural programming's linear approach. This is why SQL has endured for so long. That mathematical base allows for efficient data manipulation across vast datasets. To his point that no other languages strive to be…

The things with SQL is that it's more like parroting RelAlgebra instead of trying to implement it with a comfortable syntax. All the bad ideas of the Cobol language generation come with it.

And, like you said, SQL kills one of the core ideas of RelAlgebra: composability.

I find it very sad that behind the scenes in most relational DBs, the mess off SQL gets translated to the operator language which the optimizer works with. Now, /that/ language is pure relational algebra complete with nice mathy properties.

Re: SQL looks like English is a well intentioned error

#15

The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra, enables set-based operations, distinct from procedural programming's linear approach. This is why SQL has endured for so long. That mathematical base allows for efficient data manipulation across vast datasets. To his point that no other languages strive to be…

The things with SQL is that it's more like parroting RelAlgebra instead of trying to implement it with a comfortable syntax. All the bad ideas of the Cobol language generation come with it. And, like you said, SQL kills one of the core ideas of RelAlgebra: composability. I find it very sad that behind the scenes in most relational DBs, the mess off SQL gets translated to the operator language which the optimizer work…

The optimizer does not work work on pure relational algebra. Or works on something very similar to SQL in the case of PostgreSQL.

Re: SQL looks like English is a well intentioned error

#17

The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra, enables set-based operations, distinct from procedural programming's linear approach. This is why SQL has endured for so long. That mathematical base allows for efficient data manipulation across vast datasets. To his point that no other languages strive to be…

Being readable as english for the business people was a fad of the era. It didn't pan out, it made a mess. I still want to view the results of a controlled trial to test that hypothesis... Personally English is very different from my language and I process programming languages and natural languages very very differently. SQL is often good because is declarative, is almost always bad because of its composability story, but is and always will be a mess that makes some things more complicated than they should.

Re: SQL looks like English is a well intentioned error

#18
It perhaps is an error from the point of view of the ”leading reporting tooling vendor in China” https://www.scudata.com/about-us/ which starting in 2007 built their own Java NoSQL data warehouse+sqllite?!) platform.

https://github.com/SPLWare/esProc https://blog.scudata.com/qa-of-esproc-architecture/

Composibility aside, I’m more interested in their identification of limits of relational algebra and the alternative keywords they use for things difficult to optimize in SQL engines than their critique of using English. For that, see https://c.scudata.com/article/1694595486828?p=1&m=0

Re: SQL looks like English is a well intentioned error

#19
post #3

I am no fan of the syntax of SQL, however the authors solution of making SQL more procedural is (imo) correctly identifying an issue but then reaching for the wrong tool to fix it. When I am authoring SQL, I find the declarative and relational concepts extremely powerful and well suited to the problem I am solving.

As long as I am allowed to write keywords in capital case I am fine with the syntax. I kinda like it. It smells like the 70s.

Re: SQL looks like English is a well intentioned error

#20

The authors argument that SQL's english-like syntax is a "well-intentioned error" overlooks the accessibility it provides. SQL, inspired by relational algebra, enables set-based operations, distinct from procedural programming's linear approach. This is why SQL has endured for so long. That mathematical base allows for efficient data manipulation across vast datasets. To his point that no other languages strive to be…

See my other post in this thread.

The authors are from China so English is not a plus for accessibility in their market’s business users or analysts.

Post reply on HN