4 ms·
The only reason we live with Sql in 2024 is that the industry has stagnated. Not only the vendors: the users, too. SQL was designed for a purpose it never fulf
by jklowden 2y ago
The only reason we live with Sql in 2024 is that the industry has stagnated. Not only the vendors: the users, too.
SQL was designed for a purpose it never fulfilled and never will: end user queries. The promise was that users would write their queries so IT staff would have to write reports. But the only users of SQL today are those same programmers, many resentfully or disdainfully. Every online database discussion is rife with misinformation or silly advice ("write SQL sentences"); rare is any discussion about the relational model or first order predicate logic.
And that brings us to the user-led stagnation, as it were. If more programmers using SQL understood the fundamentals, perhaps there would be some innovation. Instead we live through the constant reinvention and rediscovery of what SQL can do, and a perennial effort to make it "easier" with ORMs and such. Actual ease, using a better language, is never discussed.
The right language to express relational algebra IMO is Lisp. I don’t mean Lisp-over-SQL. I mean Lisp over data, where tables are fundamental Lisp objects, and modifying those objects updates the database. Lisp solves all of SQL’s deficiencies: verbosity, orthogonality, composability.
The would-be inventor of a better database query language faces a daunting problem, however: there is no free relational engine. No C library implementing relational algebra over a data store. So, not only does the language need invention, but the database engine itself needs to be engineered. Nothing has happened in this area since Berkeley DB, which is barely a start and has anyway been hijacked by Oracle.
The nearest thing to a free modular database framework isn’t very close. The original Berkeley Ingres DBMS is nominally free software. But it hasn’t been portable to, say, OpenBSD for decades, and the proprietary owners are understandably not motivated to make their product a toolbox for tinkerers.
So, it seems we’re doomed to another 50 years of SQL. We have met the enemy, and he is us.
- TOMDM 2y agoIf anything the latest craze is leading us into repetition. > The LLM will write the SQL query for your end users! We are doomed to repeat the same mistakes forever.
- analyte123 2y agoIt's simply not true that the only users of SQL are programmers. In fact, I have seen the disdain programmers have for SQL be a problem, where the programmers designed a Python client for data and the major users wanted SQL.
- treflop 2y agoI don’t think it matters what language we’re using. Working with relational algebra means putting yourselves in a certain mindset and if most people honestly have no interest in learning SQL, they’re not going to learn some other language.
- Gravityloss 2y agoA lot of companies use a lot of services with builtin databases. Every single vendor is peddling their own weird query language. Just give me SQL. I don't want to learn your proprietary thing.