The article does nicely illustrate many of the well-known shortcomings of SQL. Chris Date and Hugh Darwen unsuccessfully tried to fix SQL with Tutorial D. Never heard of it? Exactly.
The article does nicely illustrate many of the well-known shortcomings of SQL. Chris Date and Hugh Darwen unsuccessfully tried to fix SQL with Tutorial D. Never heard of it? Exactly.
I agree that programmers too often seem to wave database design and integrity aside and create RDBMS/SQL worst-cases with ORMs and terrible queries, and then blame the tools.
I often joke that SQL is the COBOL of the 21st century. HHOS. There's worse things...e.g. COBOL.
Actually it's very difficult to deny the empirically discernible utility of relational databases and SQL. SQLite, for example.
I think the problem is that developers love to abstract everything. And with the database often becoming a god object it's often targeted for abstraction.
The problem is, querying data is a complex problem, complicated enough to require a query language.
So the developer goes off to abstract the database for their needs, a helper table object here, a helper row object there and eventually you start to see an Orm appear.
Developers need to be told to stop this behavior.
The abstraction is the thing you are representing in the database, not the database.
Your models should use plain SQL queries to execute behavior.
If you must, setup some helpers to do very basic crud operations, but as soon as you need to really alter a where or a select, drop to SQL, use the language as intended and watch your code suddenly become modular, readable and maintainable.
Yes, this means you will need to write SQL, yes this means you will write a lot of select and where statements, no this is not code duplication, stop freaking out about non problems.
I swear to god DRY is the source of and solution to all developer problems.
Well, just the D class of languages; Tutorial D is (as the name suggests) a pedagogy-focusses implementation of the D requirements, the intent was that there would be one or more Industrial Ds.
(Dataphor is a D—the first implemented, IIRC—and is successful enough that it's a still-living commercial product.)
"Accrington Stanley"
This is similar to the browser (especially in the pre-WASM days). No matter what language you actually wrote your software in, eventually you were going to end up converting it to Javascript out of necessity. Would you still say that your program written in C, compiled with emscripten, was written in Javascript?