If we still use math 100 years from now, we'll still use SQL. It's a fine way to query relational data, and relational data is a fine way to model reality.
I'd like to hear from people that think I'm wrong.
> If we still use math 100 years from now, we'll still use SQL.
Those are incongruent. Do you mean Western notation?
> It's a fine way to query relational data
It's quirky, but good enough for ad-hoc queries that I think it will be hard to overcome the momentum in that area.
It's not fine for application work, where you need things like composition. We've tried to solve those problems with ORMs, but the ORM is starting to fall out of fashion due to a number of problems of its own. SQL is not a great compiler target. I do eventually see something lower level built for programmers, not data analysts, rising up here. If SQL is compared to Javascript, something akin to WASM, perhaps.
ORMs, when best used (and we use them even though we're pretty SQL literate and maintain a lot of SQL) will survive forever, nothing beats an ORM for really dirt simple expressions that you want to be trivially testable. Never in my life do I want to see someone write an UPDATE query against a single table with no shenanigans with dynamic field support using string gluing to properly stitch in all the columns - this is something a known tool can do better, this is a great opportunity for an ORM.
A non-great opportunity for an ORM is anything I'd call a "report query" (some complex read-only query involving a lot of JOINs, a bunch of WHERE clauses and possibly some nested aggregation for funsies) - this is where you pull out the SQL (or alternative query language!) because an ORM will struggle to properly support all the functionality you need and because trying to tune a query being produced by an ORM (even just to make sure it's well aligned with logical indices) is a task that yields nothing but endless frustration.
I meant "still use math" as a proxy for "still use formal languages to communicate".
Maybe in 100 years AI will be so powerful that we'll just ask our question in natural language and get the answer we need. Or maybe in 100 years AI will have harvested us for the iron in our blood. Either way we wouldn't need SQL anymore.
SQL does not fully implement Relational Algebra or Calculus, which are isomorphic.
See Many of Chris Dates' books and things like Tutorial D which do meet the ALgebra.
SQL is near enough the theory to work and also has had so much effort put into making it work fast, reliably and scale for volume that a new language has too much to overcome even if it can deal with all cases. So it won't be replaced soon.
However 100 years is longer than SQL had been around so a proper relation server could come around, there is just too much uncertainty.
It's pretty obviously silly to have an unavoidable text parser in between code and data. We've reached the point where it's fairly low overhead, but it's still not nothing.
randomdata|3 years ago
Those are incongruent. Do you mean Western notation?
> It's a fine way to query relational data
It's quirky, but good enough for ad-hoc queries that I think it will be hard to overcome the momentum in that area.
It's not fine for application work, where you need things like composition. We've tried to solve those problems with ORMs, but the ORM is starting to fall out of fashion due to a number of problems of its own. SQL is not a great compiler target. I do eventually see something lower level built for programmers, not data analysts, rising up here. If SQL is compared to Javascript, something akin to WASM, perhaps.
munk-a|3 years ago
A non-great opportunity for an ORM is anything I'd call a "report query" (some complex read-only query involving a lot of JOINs, a bunch of WHERE clauses and possibly some nested aggregation for funsies) - this is where you pull out the SQL (or alternative query language!) because an ORM will struggle to properly support all the functionality you need and because trying to tune a query being produced by an ORM (even just to make sure it's well aligned with logical indices) is a task that yields nothing but endless frustration.
steve_g|3 years ago
Maybe in 100 years AI will be so powerful that we'll just ask our question in natural language and get the answer we need. Or maybe in 100 years AI will have harvested us for the iron in our blood. Either way we wouldn't need SQL anymore.
cgh|3 years ago
pasc1878|3 years ago
See Many of Chris Dates' books and things like Tutorial D which do meet the ALgebra.
SQL is near enough the theory to work and also has had so much effort put into making it work fast, reliably and scale for volume that a new language has too much to overcome even if it can deal with all cases. So it won't be replaced soon.
However 100 years is longer than SQL had been around so a proper relation server could come around, there is just too much uncertainty.
unknown|3 years ago
[deleted]
TillE|3 years ago
anon84873628|3 years ago
[deleted]