3 ms·
The article this is in response to says: > What’s worse than data silos? Data silos that invent their own query language. and: > I just want my SQL back. It’
by ken 7y ago
The article this is in response to says:
> What’s worse than data silos? Data silos that invent their own query language.
and:
> I just want my SQL back. It’s a language everyone understands, it’s been around since the seventies, and it’s reasonably standardized.
Huh? SQL is just as DSL-y as anything else. It's so non-standardized that I can't take any program written for any RDBMS and run it against any other RDBMS, unless the author specifically extracted all the DSL into an interface layer and ported it to that other RDBMS already. Even something as common as "CREATE INDEX" has different syntax on every database I've ever used.
It's even worse than HTML/JS/CSS 10 or 20 years ago, where at least it had a chance of minimally working. And you can't seriously tell me that it's harder to make SQL implementations (where you control the database) portable, compared to, say, C++ compilers (where you don't control the hardware architecture).
Yeah, data silos with their own query languages are bad. But RDBMSs are some of the worst offenders, because they pretend this doesn't apply to them. It's easy for newcomers to justify creating their own SQL-like languages, because every existing database is already merely an SQL-like language.
All these database vendors need to get together and make some "SQL5" that finally works consistently.
- stcredzero 7y agoHuh? SQL is just as DSL-y as anything else. It's so non-standardized that I can't take any program written for any RDBMS and run it against any other RDBMS, unless the author specifically extracted all the DSL into an interface layer and ported it to that other RDBMS already. There are lots of weird parallels between SQL and Smalltalk. For example, both SQL and Smalltalk are constructed with Douglas Hofstader's "strange loops." All Smalltalk object instances have a class, and the classes themselves are object instances. SQL tables are defined using metadata stored in SQL tables. Another parallel, is that the language variants are very similar, but ultimately incompatible to the point where translation is non-trivial. In Smalltalk, this is due to a toothless language standard, resulting from political maneuvering by various language vendors. Not sure what it is in the case of SQL. There is a problematic relationship between DSLs and libraries in languages of sufficient power. In programming languages with a certain level of expressive power, it's easy to write a DSL on top of a library, or on top of another DSL. https://xkcd.com/927/ https://xkcd.com/927/ I used to joke about "lady/gentleman computer scientists." What's the difference? A computer scientist knows how to implement another computer language. A lady/gentleman computer scientist knows when they should know better. A DSL should be used to super-charge your project's very idiosyncratic special context. The trick is knowing better when you shouldn't. Accessing a database isn't your project's very idiosyncratic special context.