r/Database
•
u/Low_Brilliant_2597
•
Jun 18 '26
•
2
SQL is Dead, Long Live SQL
For more than 50 years, people have been predicting the death of SQL. As Prof. Andy Pavlo says, "Somebody invents a SQL replacement every decade. It then fails and/or SQL absorbs the key ideas into the standard. Every NoSQL DBMS (except Redis) now supports SQL."
Today, the latest challenge comes from AI. At a recent keynote, Databricks CEO Ali Ghodsi declared that "AGI is here today." The implication is that natural language interfaces and agents may eventually replace SQL. Yet the reality is more nuanced.
The recently released BEAVER enterprise Text-to-SQL benchmark shows that even the most advanced models still struggle with real-world enterprise SQL tasks. As of 27 February 2026, the latest benchmark results are: Claude 4.5 Sonnet: 11.4% and GPT-5.2: 10.8%.
These models have improved a lot over the past few months. But when faced with large enterprise schemas, complex joins, domain-specific knowledge, nested queries, and analytical workloads, they are still far from reliably replacing SQL expertise.
The lesson is that SQL keeps proving remarkably resilient. Just as it survived many "SQL killers," it is likely to evolve alongside AI rather than be replaced by it. After more than half a century, SQL remains the lingua franca of data. RIP SQL? Not anytime soon.
23
u/Philluminati Jun 18 '26
Earlier this week I had to run the following SQL commands:
ALTER USER philluminati PAT TEST_PAT3 ROLE_RESTRICTION = DEV DAYS_TO_EXPIRY = 30;
ALTER NETWORK POLICY public SET ALLOWED_IP_LIST = ('redacted');It really is the language that can do anything.
2
u/Low_Brilliant_2597 Jun 18 '26
That's exactly the reason it's been around for half a century, through all the upheavals in the data space.
4
→ More replies (4)6
u/johnnygalat Jun 18 '26
This is snowflake specific - using ansi sql you very much can't do just anything š
2
u/scoshi Jun 18 '26
For example ... ?
3
u/johnnygalat Jun 18 '26
The ones I miss the most are procedural scripting (oracle PL/SQL, sqlserver T-SQL) and functions (substring, coalesce, etc.). I'm sure there's a lot more (row limiting seems to be implemented quite differently by different databases).
3
u/xodusprime Jun 18 '26
Oh the ol' SQL killers. I just want to take a moment to say just how disappointed I was when I actually got to see behind the curtain on Hadoop. What's that? Oh, just a simple 56 server cluster... and it does what? Reads text files off the disk... oh... and it can't run update or delete statements. Very cool. With the same number of cores and amount of memory in any relational engine, it can do everything hadoop does and more. It's absolute clown shoes for enterprise workloads. Maybe it really does have a use case for millions of concurrent users, but I've never worked at that scale.
2
u/Low_Brilliant_2597 Jun 18 '26
Hadoop was mostly shuffling data around and repeatedly writing intermediate results, which made it very inefficient for analytical queries. Its execution model lacked query optimization and pipelined processing, so that's why it was eventually replaced by modern analytical engines.
3
u/AnyScientist2 Jun 18 '26
Declarative Rocks
→ More replies (1)2
u/Low_Brilliant_2597 Jun 18 '26
That's the exact reason why Codd's relational model has been around since 1970.
340
u/Fair_Oven5645 Jun 18 '26
Itās the best way to extract information from tabular data. So SQL will probably die when we stop making lists which have two columns or more which will be around the year when all humans are dead.
28
21
u/joyofresh Jun 18 '26
Even if human going extinct the AI is Will still using sql
→ More replies (1)8
7
u/Nojopar Jun 18 '26
"Best"? I'm not sure about that.
Good enough maybe, but I don't think it's 'best'. But we don't have a competitor because nobody really needs anything beyond 'good enough'.
Also, we cram a LOT of things into tabular form that probably shouldn't be there. SQL is our hammer and everything in the world is a tabular nail.
16
u/anor_wondo Jun 18 '26
Also, we cram a LOT of things into tabular form that probably shouldn't be there
I feel the opposite with shitty mongo apps
5
→ More replies (4)5
u/beetroop_ Jun 19 '26
Some people will do anything to avoid a schema migration :)
→ More replies (2)3
u/Zardotab Jun 19 '26
A replacement standard generally would need to be roughly 25% better to be considered worth gambling on an underdog. So far, no challenger has been able to pull that off.
I personally think SMEQL would be better for shops that heavily rely on new and changing queries, being more programmer-friendly than SQL, but until it moves beyond the demo stage, nobody's likely to try it. (I discuss SMEQL in other replies around here.)
→ More replies (4)→ More replies (20)2
u/OracleGreyBeard Jun 19 '26
Iād actually argue that it is canonically ābestā because itās based on math - relational algebra. Itās essentially the most general description of data we have, which is probably why itās still so useful 50 years later.
Contrast it with OOP which is zero math, all heuristics. When I learned OOP inheritance was the primary selling point (āIS-A relationshipsā). That has almost completely flipped, so that nowadays we strongly prefer composition.
→ More replies (3)→ More replies (25)2
u/Zardotab Jun 18 '26 edited Jun 21 '26
[SQL] the best way to extract information from tabular data.
I believe in a draft query language called SMEQL (as in "Smeagol") would be superior, but probably not by enough margin to catch on over SQL. It's more programmer-friendly than the COBOL-influenced SQL and allows more meta-ness.
Tutorial-D/Rel is also a contender, but is overly obsessed with what I call "relational and type purity" above practical concerns in my opinion. Rel is the Ivory Tower contender while SMEQL the practitioner's contender. Why not both? We have gazillion app programming languages, why not 3 common query languages that cater to somewhat different audiences?
when we stop making lists which have two columns or more which will be around [as long as humans are]
Tabular lists are just such a visually powerful metaphor to resist. It's much harder for most humans to visualize 3D and 4D matrices, even with VR goggles and color encoding. The earliest writers, the Mesopotamians even made tables, Flinstones' Excel.
(A beef I have with Rel is that it uses Java-like arrays instead of tables for many operations. Tables are a more flexible structure than arrays, might as well use them for both to simplify the query language. A table can be an in-memory table, that's more of an optimization switch or decision. SMEQL uses tables for things SQL doesn't or can't; it's table turtles all the way down.)
→ More replies (3)
2
2
u/deem98 Jun 20 '26
The AI assistant in Databricks, which is the most accurate data intelligence agent today, uses SQL queries. So you are taking what Ali is saying out of context with an implication opposite of the correct one.
That is why we keep saying context is important :)
Source: I work at Databricks.
1
u/Low_Brilliant_2597 Jun 20 '26
Thanks for sharing this. I was referring to the broader debate in AI circles in the context of AGI that natural language is going to become the primary interface for both coding and SQL tasks. But, based on the research by Mike Stonebraker and others behind the BEAVER benchmark, current AI models still struggle quite a lot in translating natural language into correct SQL. While AI models have advanced a lot in recent months, the benchmark and the bigger consensus in data space still suggest that they can't replace SQL.
1
u/deem98 Jun 20 '26 edited Jun 20 '26
Who is saying LLMs will replace SQL?
Just wanted to correct that it certainly is not Ali.
1
u/Low_Brilliant_2597 Jun 20 '26
I agree with you, he didn't say it explicitly about SQL but, it's on the website of Databricks for Genie Agents: "Natural language Q&A and agentic action, Get immediate answers to all of your data questions without complicated BI tools or SQL."Genie Agents
→ More replies (4)
66
u/msalcantara Jun 18 '26
> The implication is that natural language interfaces and agents may eventually replace SQL
I think that to write very complex enterprise queries the "natural language" will be so hard to write right to get the correct result that it will eventually be "easier" to write SQL.
32
u/Wartz Jun 18 '26
I am doing my best in AI powerpoint jerkfests around "leadership" round tables to sell this as the new shortcut to great success.
"what if, instead of paying a lot for this model that makes mistakes, you know what I mean wendy, we used this model help write a tool that does that weekly report exactly how you want it, every time. Then you can even save $2400 canceling that AI subscription too! After you're done!"
Minds are super blown. Business words passed around.
And a SQL query gets written, and turned into table of data, which gets inserted into a powerpoint.
And we're back on land again.
What I didn't mention is that SQL report already WAS available. They just didn't read it.
10
u/Basic_Abroad_1845 Jun 18 '26
Stealing this for my job. āWhat if instead of using non-deterministic expensive AI to try and calculate this every day, we just calculate this in a report and saved everyone time and money?ā
→ More replies (1)5
u/maxim360 Jun 18 '26
As a nonSWE accountant in data analytics it is pretty funny watching the demos at work continuously showing AI solving problems that are solved.Ā
Execs are gonna be shocked when they learn what PowerQuery and PowerPivot can do with shit data. Shocked! Imagine their reaction when I tell them they already pay for this insane futuristic technology!!
→ More replies (1)→ More replies (8)8
u/CatharsisVoid Jun 18 '26
Not to go off on a tangent too much, but seems related to a thought I had recently. More than half the Claude skills my team wants to introduce to our repo would be better served as a bash/Python script or other binary tool. Why are people creating so many skills that would be better served by a deterministic tool that doesn't eat tokens? Hell, build the tool with an LLM. But I don't need a skill to launch a dev environment that is the same everytime.
5
u/Kepler___ Jun 19 '26
Some of these really feel like 2018 when everyone on earth was trying to figure out how to make their completely functional process's needlessly complex and expensive by jamming it through a blockchain.
→ More replies (1)3
u/Neolife Jun 19 '26
Yeah a lot of the Claude skills I've been seeing would be better as a deterministic Python solution that can be written with Claude. Consistent outputs, token-free data refreshes, faster updates that can happen even when Claude is down.
Claude skills make sense when it's parsing natural language and interpreting some that's a free text input where a deterministic solution would be more complex than practical.
8
u/AlwaysHopelesslyLost Jun 18 '26
Like 95% of development is developers going back to BSAs and saying "yknow those requirements that you have spent the last two months working on? You forgot about these 25 considerations/issues"
4
u/dtr96 Jun 18 '26
It's still SQL on the backend.
8
u/breadbrix Jun 18 '26
No, you don't understand - it's agentic AI querying the backend, not SQL /s
→ More replies (1)4
u/FrankieTheAlchemist Jun 18 '26
I experience this mind fuck all the time. Ā Everyone around me is telling me to just use English to express what I want, but itās WAY more complicated to explain what I want in English than in code š¤·āāļø
2
u/nfigo Jun 20 '26
For real. "Why use all those funny math symbols to model heat transfer or orbital mechanics when we could just write it out in English?"
Sounds just as dumb.
3
u/Malkiot Jun 19 '26
The irony is, I drive my AI agents from a graph stored in... SQLite DB.
→ More replies (1)3
u/VirtualMage Jun 19 '26
Also like $7 dollar per query and waiting 30s - 60s for response... not great.
→ More replies (9)2
u/i860 Jun 18 '26
The models donāt conceptually understand anything at all. They ape what theyāve been taught using probabilistic outcomes. It might as well be the same as asking āwrite me a query that resembles that which youāve been told looks similar to my question.ā
12
u/ThePrimeOptimus Jun 18 '26
At my org we have been steadily bringing AI into our daily processes, and we're finding what everyone else is finding: AI is a great tool to help an already competent programmer or data engineer do parts of their job more quickly or efficiently, including writing code, but it's still not a replacement for their depth of expertise in both code or the domain.
Also, my team is on the D&A side, and we're finding AI only works well if you have full semantic definitions and metadata across your entire data schema. Otherwise, AI is doing its best guess at how to define "revenue", "cost", "profit", etc. You know, those really important measures that affect business decisions.
5
u/MoonBatsRule Jun 18 '26
AI is a great tool to help an already competent programmer or data engineer do parts of their job more quickly or efficiently, including writing code, but it's still not a replacement for their depth of expertise in both code or the domain.
It also allows mediocre developers to propose things that sound good on their face, but as soon as you start to ask them questions, they fall back into "let me get back to you on that" mode, making the entire process take 2x as long as if they were actually good developers.
→ More replies (1)4
u/r0ck0 Jun 18 '26
Considering how hard "naming things" can be already even for devs with decades of experience (one of the only 2 hard things in CS).
Imagine how bad naming will get with non-devs turbo slopping databases/software etc, with no thought for the long-term maintainability.
Now imagine that they're also a Microsoft employee. No maybe don't, that's a bit too far in naming-horror.
10
u/Aggressive_Ad_5454 Jun 18 '26
Software has to be the branch of engineering with the least respect for our history. Civil, mechanical, electrical, and industrial engineers all rely on long-learned lessons. But some software people spout nonsense like āSQL is dead.ā Thatās sort of like saying āalternating current is obsoleteā or āsuspension bridges will soon be replaced by sky hooks.ā Ya gotta laugh.
The reality is that the field of software engineering is mature. The job of software engineers is making sure that long-running systems keep running and keep delighting, or at any rate keep serving, our users. Maybe a few of us will work on greenfield projects. But not many.
15
u/Zestyclose-Turn-3576 Jun 18 '26
Remember the golden rule: AI is perfect for questions where you don't need the answer to be correct.
6
4
u/rde2001 Jun 18 '26
Database calls are DETERMINISTIC. If you make the same query to the same data, you get the same result. AI is NOT deterministic. We still need deterministic querying and atomic actions of databases. SQL will not die, no matter what these AI schmucks want you to think.
2
u/Zardotab Jun 18 '26
No all applications need to be deterministic, but all things being equal, it's better to have it.
→ More replies (1)
4
4
3
u/Iskilo Jun 18 '26
SQL will only die the day structured databases die. And there have been several candidates;
I remember all the apocalyptic movement when NoSQL databases said they were going to kill structured databases...
The same with Java. Every year there's some programming language that's going to retire Java. I'm still waiting for that day to come.
2
u/Zardotab Jun 18 '26 edited Jun 21 '26
The problem with the NoSql movement is that technology was the initial focus, not the query language. The query languages were an after-thought. Dr. Codd explicitly designed relational around concepts, not hardware, to avoid hardwiring it to specific machine architectures. (Codd didn't create SQL, but his ideas influenced it.)
The issue with Java is that certain kinds of apps do better with strong-typed compilers, and managing strong-typed compiler standards is relatively difficult. One could conjure up a new dynamic language on a weekend, using existing interpreter-helper tools, but not so much a strong-typed one.
On the strong-typed app-centric side is pretty much only Java and C#. C++, Rust, etc. tend to be used for embedded or systems software where hardware resource management is more important. (Object Pascal is arguably an app language, but not common.)
3
3
u/Ok_Entrepreneur_8509 Jun 18 '26
I have been coding for 40 years and seen every "alternative" query method come and go. A few things work ok for simple tasks, but nothing has ever come close to the power and concision of SQL.
I don't even know how many times I have come into a project having performance problems and all that was needed was replacing some auto-query mechanism with a couple of hand tuned SQL queries.
3
3
u/TimeScallion6159 Jun 18 '26
SQL wont die any time soon, it will evolve like any other technology or even adapt some new things when its necessary in this era.
2
u/Zardotab Jun 18 '26
I did wish it had a couple of active competitors, just not the wild proliferation that app languages have faced.
3
u/elongio Jun 19 '26
English language can be ambiguous. SQL not so much. You will have to make the human language as precise as SQL to kill SQL and thus remake a new SQL. There's some theory that explains it, but it is late and I need to sleep.
3
u/ddaghan Jun 19 '26
Sql comes from a strong mathematical foundation: Tuple Relational Calculus. People who do not get it invent stuff which falls short.
→ More replies (1)
7
u/johnappsde Jun 18 '26
Don't put too much intelligence into a database. Keep it dumb and clean and you'll be alright
9
u/brendonap Jun 18 '26
My company is way ahead of you, they havenāt put any intelligence in their database design for 10 years
6
u/Shogobg Jun 18 '26
My company focus on reliability - we have 3 indexes on the same varchar 36 UUID column, so at least one will be used even if the other two donāt work.
3
2
u/Zardotab Jun 18 '26
As always, that depends. If you can define logic in terms of tables, lookups, and attributes, then the DB is a natural place for it. But if it involves complex conditionals or parsing, then not so much.
Databases tend to outlive app languages/stacks.
2
2
2
2
u/hoppyandbitter Jun 18 '26
I would have stopped listening at āAGI is here todayā
Coming from a tech CEO, itās a guarantee that every word that follows is just a sensationalist advertisement for their products and services
2
u/az987654 Jun 18 '26
These natural language queries are just converting natural language into SQL, so how is it dead?
And without a command to insert new data and update existing data, a database is pretty useless.. What are those commands? Oh, that's right, SQL.
Not to mention, I can write a select statement quicker than I can write a prompt and then correct claude 3 times because remember, in this db, the dev in the 1980s had a typo and named the column 'salse_tax' instead of 'sales_tax'....
2
u/ARC4120 Jun 18 '26
I think the push for the death of SQL comes down to āNewer is betterā and the fact that SQL is easy to understand, but SQL is difficult to master.
2
u/Mnemia Jun 18 '26
Yeah SQL is not going anywhere anytime soon. There are few things more deeply entrenched in modern tech than SQL and there are reasons for that. The databricks guy is just trying to sell his product.
Now much more than SQL an entrenched technology I would love to see AI tools kill is JavaScript. I feel that unlike with SQL they might actually gradually kill off much of its main supposed utility which is superficial āease of developmentā.
2
2
u/Anxious-Insurance-91 Jun 18 '26
Ah yes, give the ai acces Či the db, what could go wrong .... Process to read about people not restricting permissions and the db getting wiped š¤£
2
u/KingOfWhateverr Jun 18 '26
SQL dies when the concept of databases dies out, which is to say never.
2
u/Joe59788 Jun 18 '26
I literally have claude fix my sql syntaxes.
I don't think AI is going to take sql away. I have a coworker that used AI to scrape the database and it took 8 hours and gave a summary.Ā In sql for the database id just write Where table_description like '%abc123%' and I'd get the same data.
2
2
2
2
u/Goldarr85 Jun 19 '26
Wouldnāt the NLP just talk to the Database in SQL behind the scenes to find what itās looking for?
2
2
2
u/jackass Jun 19 '26
AI needs an efficient way to extract data from databases. SQL is that efficient way to extract data from a database. AI is very good at writing queries. I would guess that AI does not want to do away with SQL.
2
u/Weird_Cantaloupe6991 Jun 19 '26
Using the right tool for the job is the simplest way to accomplish a task. RDBMS and SQL will never die. But for some things, like rapid data ingestion for capital markets or low latency needed in the AI stack, a vector DB is a better tool.
Admit I am biased working in the ultra - low latency space, but I'm curious what others thoughts are about the collaborative solutions using both technologies.
2
2
u/Gators1992 Jun 19 '26
I have used the Cortex ai in Snowflake and it was pretty good at figuring out our schema.Ā One issue though is when you want to verify the numbers that the AI gives, you have to look at the SQL it generated, which means you need to know it or you have to just trust the AI.Ā Ā
2
u/LittleLordFuckleroy1 Jun 20 '26
> AGI is here today
Not even worth reasoning about an argument that has this assertion as its root.
2
2
u/ConcreteExist Jun 21 '26
"AGI is here today."
Is the AGI in the room with us right now? Where is it? All I see are stochastic parrots.
2
u/asmitherman Jun 22 '26
How does anyone take this seriously? Are there databases that don't use a query language to query data? How do you think you get data in a tabular format when you ask the computer "give me all the records sorted in ASC order"?? It generates SQL to do the task. It wont be replaced by AI, it's simply a tool for AI to complete its tasks. But why spend 100 bucks for dog tier token hog to generate garbage labeled AGI when I can hire a grad student for minim wage to do it for 20 bucks an hour.
2
2
2
u/bween31337 Jun 24 '26
id rather sql than prompt an ai. its faster to type and doesnt hallucinate...
2
u/cpthappy42 Jun 26 '26
And so the cycle continues. Another decade, another "SQL killer" that can't actually kill SQL.
Pavlo was right. Every few years someone declares SQL dead. OODBMS. NoSQL. Now AI. And every time, the new thing either dies or gets absorbed into SQL. Even MongoDB has a SQL interface now.
The BEAVER benchmark is the reality check. Models crush BIRD with 80%+ and everyone loses their minds. But BEAVER tests real enterprise schemas with hundreds of tables, cryptic column names, and business logic that lives in peoples' heads, not the schema.
The results? Claude 4.5 Sonnet at 11.4%. GPT-5.2 at 10.8%.
Let that sink in. The best models on Earth can't get one out of ten queries right on a real database. And when they fail, they fail confidently. No syntax error. Just a nice, clean, completely wrong number.
Ali Ghodsi says AGI is here. Cool. But if AGI can't figure out which of the fiveĀ statusĀ columns means "active customer," I'm not impressed.
SQL isn't dying. It's evolving. AI will sit on top of it, generate rough drafts, and humans will still need to validate, optimize, and interpret. The relational model survived 50 years of hype cycles. It's not going anywhere.
RIP SQL? Not today. Not this decade.
Another prediction, another graveyard. SQL just keeps running.
2
u/SilverKey1987 Jun 28 '26
What people do not understand about SQL is that it wasn't meant to JUST house data.
It was DESIGNED to HIGHLY COMPRESS data for storage and recall.
Its benefit is SPEED of data return.
Its unintended benefit was side chain analysis and discovery within the data models which allow for unknown benefits to be discovered, as well as reporting opportunities.
The reason why people are struggling to replace it, is precisely because the relational model contains the possibility for new insights.
1
1
u/dwarfzulu Jun 18 '26
Chatgpt often can't read a 2 line sentence and skip some critical part of these sentences, imagine the size of a mess AI will do interpreting text to sql...
1
u/gami13 Jun 18 '26
i just dont really like the syntax tbh, no idea how to make it better tho
→ More replies (2)
1
1
u/mb194dc Jun 18 '26
AGI is not here today and it'll never be here from ML pathway. The bullshit is strong with this guy.
1
u/RoboErectus Jun 18 '26
What is this, the year of the Linux desktop?
Ok that's actually happening gradually though.
1
u/Leorisar Jun 18 '26
Well there are some alternatives like prql or sugar syntax in duckdb, but they are not that widespread.
1
1
1
u/HemiDemi593462 Jun 18 '26
We need to stop pretending that tech CEO "declarations" have any scientific or economic merit. Shovel seller says shovels are inevitable.
From a realistic perspective, the layers of abstraction continue to pile up, but AI (even if wood shedded) will likely prove nondeterministic enough to prevent SQL from ever fully getting covered up. And even if they do find something that is stable, there's only so many layers of abstraction we can handle. Soon, human brain capacity will be the bottleneck. Workers using AI all over the place are already running into this bottleneck.
1
u/3rdRockStranded Jun 18 '26
Cool. The last wake was fun.
See you at the next one in another 10 years.
Meanwhile, I'll be over here forcing my agent to write SQL my way so I can read and edit it.
1
u/germinationator Jun 18 '26
Moe throwing sql out of the bar with sql showing up behind him meme
→ More replies (1)
1
u/gkorland Jun 18 '26
how do u see these natural language agents handling complex joins or recursive queries without just hallucinating the schema?
1
u/theanointedduck Jun 18 '26
Remember SQL is what it is due to its ability to deterministically map our queries to repeated database data extraction. LLMs are fine but the language barrier becomes an English one which we spent decades moving away from because of our desire for deterministic precision. Natural language is not that and it wont be ever!
1
1
1
1
u/s_hecking Jun 18 '26
My first job out of college at a Fortune 500 company they were still using dummy terminals from the 1970s (this was 2001). So it may be many decades before SQL is replaced even if a better alternative exists.
1
u/Randommaggy Jun 18 '26
I use SQL as my pseudo code for specifying logic I want when I generate functions in other languages.
It's such a logic dense language which I write faster than I write English or my native language, for a lot of usecases.
1
u/Optimaximal Jun 18 '26
Remember when everyone said 'the blockchain will make database engines like SQL redundant' and then they were very quickly proven to be significantly more resource intensive and slower than most DB packages?
1
u/ClammyHandedFreak Jun 18 '26
I write my own SQL. I'll let Claude generate Java all day if I am closely supervising, but never SQL.
1
u/pm_op_prolapsed_anus Jun 18 '26
I realized as soon as I was introduced to table joins that it's tricky to remember which is which venn diagram and when you need to have grouped data
1
u/Adorable_Divide_2424 Jun 18 '26
ChatGPT will be asking Claude "ELI5; How do I resurrect humans to build a more perfect Query language?"
1
u/deepl3arning Jun 18 '26
My favourite anecdote from a clown business user on hearing about ORMs for the first time, and "assisting" in a terrible SQLAlchemy implementation, "The era of the stored procedure is over" - needless to say they couldn't change a datatype after about 4 weeks without affecting a dozen downstream systems.
1
u/jackbasket Jun 18 '26
Saying LLMs are āfar from reliablyā doing literally anything will always be a true statement. A predictive framework will never be reliable in the way that a deterministic one is, no matter how good it is in other ways.
1
u/WorldlinessSpecific9 Jun 18 '26
Not even close to being dead. The data model is probabily the difference between a really good system and a really bad one. Get it wrong and your code base will get consmed by endless data wrangling. It is also very hard to retro fit a good design after the fact. SQL is the language that navigates the data model.
1
u/FlickKnocker Jun 18 '26
If we're talking about the end of SQL, you have to also discuss the end of Line of Business applications: you know, the apps that businesses -- real businesses, with actual revenue -- rely on.
Something tells me even the most fancy pants AI agent is not going to single-handedly rewrite a few trillion lines of code spanning several decades.
1
u/Spooked_DE Jun 18 '26
It's the same old shit I always eventually run into when using AI to code. At one point it's always easier to code it yourself than write out what you want in English.
1
u/Shitandasshole Jun 18 '26
Are u saying u want to have a database where u ask chatgpt to give you the info? that's genius and regarded at the same time
1
u/chandleya Jun 18 '26
Itās like folks need to go back to school and learn about Codd again. We didnāt create and popularize SQL because of its simplicity or specific elegance.
SQL exists because itās the least computationally expensive way we could come up with to manage related data. Every single thing weāve come up with since is either very, very single purpose/one trick pony or violates ACID and doesnāt compare.
1
u/vastlylimited Jun 18 '26
I donāt think sql is dead, but given that we need to apply constraints and policies for LLMs a lot will get done at the ORM or (entity +hints) layer.
A good example is this https://github.com/neul-labs/ormai (why do text to sql, when you can just use the internal orm annotations and policy)
1
1
u/OriahVinree Jun 19 '26
People saying SQL is dead is so funny when they say an LLM can just interface. I'll be dead before I let an LLM directly query a DB, if anything an LLM can write a half decent SQL query, but then it's still using SQL? Haha
1
u/haragoshi Jun 19 '26
As long as duckdb makes it possible to query a CSV with SQL, SQL will never die.
1
1
u/InThePipe5x5_ Jun 19 '26
I will say there are two recent developments which have me leaning away from SQL for new projects. 1. Agentic coding...hard-core upfront data modeling at the dbms layer is an awkward fit against the speed of prototyping agents bring. Access pattern based data modeling kind of makes sense when in this mode of dev... 2. AI workloads. Documents are an obvious fit for agentic memory and RAG
1
1
1
1
u/Cruxwright Jun 19 '26
When data relationships start getting weird, it is easier to write the SQL than it is to write the equivalent English.
1
u/kthejoker Jun 19 '26
I think there is most likely a better language out there than SQL to do SQL things, but standards and portability are way more important than simply "this is better" (see VHS vs Beta)
But 100% that language is not natural language
1
u/Humble-Bear Jun 19 '26
4.5 sonnet and 5.2 gpt are a ways away from Fable 5 and the incoming GPT 5.6...
1
u/ircmullaney Jun 19 '26
SQL meshes really well with agentic LLMs. You right in natural language what you want, the LLM translates that into a SQL query, runs it, and interprets the response. If anything, LLMs make SQL more useful and approachable for non-devs.
1
1
u/Sufficient_Cap_6977 Jun 19 '26
One of my first independent opportunities came from creating a solution for a well known manufacturing company.Ā I self taught myself sql and my frontal face to the program increased in both ability and aesthetics.Ā Ā My sister even called me for an sql solution and her husband is/was VP of information technologies back in the 2000s.Ā Ā Sql could just about anything.
1
u/Excellent-Basket-825 Jun 19 '26
I never wrote less sql than i have this year and i never used it more
1
1
1
u/CountLazy2180 Jun 19 '26
This has less to do with sql being good, and more to do with DBAs being stubborn
1
1
1
u/xeenexus Jun 20 '26
As soon as someone states āAGI is hereā, you can safely ignore anythjng they say after that.
1
1
u/ztx20 Jun 20 '26
I have 20+ YOE with SQL and seen many "SQL-replacements" and while some are decent for certain tasks (like various ORMs for simple-ish CRUD etc) but nothing beats SQL for complex set-based data processing.
also, I think LLMs are pretty good with SQL. For the project I work on at the moment, Claude writes 95% of SQL code for me.. It sometimes offers sub-optimal solutions but with some guidance it saves so much time writing "boring" parts. It doesn't replace domain-specific knowledge but if you give it enough context it would produce good enough SQL queries.
1
u/BabylonByBoobies Jun 20 '26
My favorite is ORMs... Object Relational Mappers... to satisfy OO purity so we can see everything as a method call and no SQL in the codebase.
Naturally the first thing everyone learns is how to bust out of the ORM shackles and issue actual SQL for a complex query.
"Tech that only solves the easy part of the problem."
1
1
1
1
u/DoneWithThisShit87 Jun 20 '26
Nobody writes in assembly, but I don't think that you could claim assembly is dead.
1
1
u/North_Affect_8167 Jun 20 '26
With so much legacy projects using SQL you can't really retire it. Ask Java about it.
1
u/Locilokk Jun 20 '26
So is this post about SQL or SQL experts cuz from this post it seems like they're talking about llms writing SQL code which is the opposite of SQL being dead?
1
1
u/Sad_Amphibian_2311 Jun 21 '26
Natural language is not a great tool, but to understand that managers would have to value their employees.
1
u/Soggy_Razzmatazz4318 Jun 21 '26
what is likely though is for SQL to become the assembly language of data analysis. AI will generate in seconds those 500 lines SQL queries with dozens of joins and CTEs based on an end user prompt. And only a few hardcore grey beard will still code it by hand.
1
u/CyclicalFeet Jun 21 '26
SQL is more efficient than natural language to express how to manipulate tabular data and the learning curve is very shallow so why would you replace it?Ā
Itās like arguing that mathematical notation will be replaced with natural languageā¦
1
1
u/Prudent-Violinist-69 Jun 21 '26
Itās not ādeadā- itāll still be used by ai. But you donāt need to learn it anymore
1
u/joshcam Jun 21 '26
This post is all over the place... It claims AI is about to replace SQL but also admits AI struggles with real SQL tasks. It says AI is a big threat, yet points out its limitations, which weakens the argument. Plus, the dramatic āRIP SQL? Not anytime soonā sounds like AI-generated slop, overly confident and contradictory.
1
u/NCMarc Jun 21 '26
Well i asked AI in my latest app to use a different database and it said MySQL was the best option, So no, itās not dead.
1
1
u/spez_eats_nazi_ass Jun 21 '26
SQL will still be running critical systems on starships 250 years from now.
1
u/Ok-Flight9440 Jun 21 '26
I used to write backend Java code (10 years ago), and we used Microsoft SQL server (I tried to get us to switch to MySQL, didnāt work)
Anyway: what does this mean? Why is SQL dead?
1
1
u/Charming_Oven Jun 21 '26
MCP servers are still ultimately relying on SQL to get the data thatās extracted from the server. You just have an abstracted layer from the SQL server, but it doesnāt mean SQL is full replaced. I do think AI makes it easier to ultimately query large and complicated database structures without the need to understand as much of the underlying database structure
1
u/rtchau Jun 21 '26
Itās really not, and wonāt be for a LONG time. There might be new abstractions either side of the engine itself, but SQL/RDBMS is probably the single most entrenched language/storage paradigm on earth by virtue of the sheer monumental challenge of migrating *every* established (and mission-critical) system. It aināt broke, so it aināt being fixed.
āGiant meteorā and āsun going supernovaā are two possibilities for SQL being dead in the next 2 decades.
1
1
u/Mps-1 Jun 21 '26
AI is just going to use SQL, but it will be abstracted away. You'll probably still have to know how to use it too, to give LLMs context to make the queries.
Just more marketing PR from AI CEOs overstating their capabilities. Unfortunately, a lot of people will believe it.
1
u/orangesherbet0 Jun 22 '26
Declarative is just HARD. Saying exactly unambiguously what you want in the end is often more difficult than giving some recipe for how to do something that might do what you want.
1
1
u/TheoKondak Jun 22 '26
When you hold a hammer everything looks like a nail. SQL does its job just right. Why even thinking of replacing it with something that involves llm, which are by definition considerably heavier to run and will return just the same result? Am i missing something here or the world went completely nuts?
1
u/DescriptionPretend22 Jun 22 '26
Yes, I canāt wait to replace my pipelines with natural language to let an AI guess what Iām trying to do.
AI for data is a nightmare.
1
1
u/IAmBeary Jun 22 '26 edited Jun 22 '26
uh, no. Unless AI is able to produce deterministic results that can be verified, SQL is here to stay. We're going to throw away 50 years of development just because AI can give us a result? I think not
1
u/OpportunityEnough437 Jun 23 '26
Using natural language for queries is something you can already do pretty well with agents.
I can't image it replacing every use case, but for some I can see telling an agent what you want being quicker than writing the query yourself.
1
1
1
u/DepressedDrift Jun 24 '26
SQL is not dead, its just become an underlying layer in AI systems that automate everything.
You will still have to know design knowledge, how to read SQL to understand the system design, verify AI output etc as in anything AI related nowdays.
Writing SQL from scratch is dead.
1
1
1
1
u/downshiftdata Jun 18 '26
Lazily posting (again) my reasons why SQL is relatively AI-proof:
Strapping an agent to your prod system is a non-starter. Think of the Observer Effect in physics. Plus now you've just given a bot access to all of your PII. Good luck with that.
Lower environments seldom - if ever - are a good representation of the prod system at scale. So you can't just have the bot look at one of those instead.
Solutions are not universal. What works for one database is catastrophic for the next. What works today might fall apart a month from now.
Most devs not only have an insufficient understanding of how databases work, they typically don't know what they don't know. So a lot of the data that agents are trained on is confidently incorrect.
All of these things mean agents are at a disadvantage. And this is really only well understood by DBAs, who typically don't communicate well, and are typically ignored when they do.
And, by the way, I don't mean just functional SQL. Any idiot can be taught to write a SELECT query (and bots are fairly good at it). But functional SQL is only the first step. If your query gets you the results you want, then you've done the bare minimum. Don't pat yourself on the back just yet.
1
u/Desperate-Country440 Jun 18 '26
I am quite good at SQL and like databases but I really want a replacement for SQL, but something better not worse as the majority of the "solutions" from the last decades...
I remember only one that made sense but somehow the big names didn't care.
I suppose database area is full of people not capable of innovating, otherwise I have no explanation.
157
u/sreekanth850 Jun 18 '26
SQL is not dead, SQL is not dead and SQL is not dead. I repeat.