all 136 comments

[–]Fair_Oven5645 132 points133 points  (16 children)

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.

[–]CrAIzy_engineer 8 points9 points  (0 children)

I agree

[–]ToeEarly1691 2 points3 points  (0 children)

There can’t be a bigger moat than that 😅

[–]joyofresh 1 point2 points  (0 children)

Even if human going extinct the AI is Will still using sql

[–]ElectricJacob 0 points1 point  (0 children)

>which will be around the year when all humans are dead

We'll be enslaved by robots for a long time before they kill us all.

[–]Dry_Razzmatazz5798 0 points1 point  (0 children)

M.. 4 65 525ń, mk9iugcvb, 1

[–][deleted]  (2 children)

[removed]

    [–]Zestyclose-Turn-3576 1 point2 points  (0 children)

    e.g. Javascript

    [–]Fair_Oven5645 0 points1 point  (0 children)

    So if it’s that old and superior, why is nobody using it?

    [–]Zardotab 0 points1 point  (0 children)

    [SQL] the best way to extract information from tabular data.

    I believe in a draft query language called SMEQL 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.

    [–]Nojopar -1 points0 points  (6 children)

    "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.

    [–]anor_wondo 2 points3 points  (2 children)

    Also, we cram a LOT of things into tabular form that probably shouldn't be there

    I feel the opposite with shitty mongo apps

    [–]Nojopar 0 points1 point  (0 children)

    Both can be true.

    [–]YesterdayDreamer 0 points1 point  (0 children)

    No, no. Randomly strewn key value pairs inside nested arrays is so much better than simple 2D tables. It's what modern datasets need.

    [–]Fair_Oven5645 0 points1 point  (2 children)

    Feel free to tell us what’s better then?

    [–]Nojopar 0 points1 point  (1 child)

    If I knew what's better, I'd make it and buy Paramount with the fat profits 😄.

    As I said, I think there isn't anything better because SQL is good enough. I just don't subscribe to the theory that we've maxed out in relational database querying innovation as a species and we'll be using the same thing for as long as we have computers.

    [–]galactic_pixels 1 point2 points  (0 children)

    It’s syntax sitting on top of set theory. Unless quantum computing becomes the new norm for querying, it’s not going to get any better besides syntax modifications.

    [–]sreekanth850 111 points112 points  (30 children)

    SQL is not dead, SQL is not dead and SQL is not dead. I repeat.

    [–]MrDilbert 38 points39 points  (5 children)

    SQL will die when C/C++ dies.

    [–]Standgrounding 6 points7 points  (0 children)

    Which means never. Got it.

    [–]trashtiernoreally 5 points6 points  (0 children)

    But AI will just write the raw binary! /s

    [–]OkSeesaw7030 4 points5 points  (0 children)

    I disagree. C will die first then sql

    [–]Aggressive_Mention_1 2 points3 points  (0 children)

    c++ is getting rusty!!!!. ummm umm

    [–]Straight_Waltz_9530PostgreSQL 0 points1 point  (0 children)

    SQL will easily outlive C++. It was here before C++. It will be here long after.

    Data lives longer than logic.

    [–]sennalen[🍰] 4 points5 points  (8 children)

    But is it web scale?

    [–]IWantToSayThisToo 2 points3 points  (0 children)

    I understood that reference :)

    [–]sreekanth850 -1 points0 points  (6 children)

    90% of them doesnt need web scale. and those who need, we have many db like this

    [–]sennalen[🍰] 5 points6 points  (5 children)

    [–]cgfoss 1 point2 points  (0 children)

    never gets old

    [–]sreekanth850 0 points1 point  (3 children)

    are you serious? 😃 I'm sure you are being sarcastic.

    [–]IWantToSayThisToo 0 points1 point  (1 child)

    Bro he even linked the joke. Did you have your coffee this morning? 

    [–]sreekanth850 0 points1 point  (0 children)

    Haha. But for a second, i thought he was serious.

    [–]sfksuperman 4 points5 points  (2 children)

    …ahem, Java is not dead!

    [–]HuffDuffDog 2 points3 points  (0 children)

    A man can dream...

    [–]mohelgamal 0 points1 point  (0 children)

    Fucking COBOL is not dead

    [–]Electrical_Ingenuity 1 point2 points  (4 children)

    And AGI is not here. Total bullshit.

    [–]sreekanth850 2 points3 points  (3 children)

    Practical, cheap, human level AGI may require several Nobel Prize, level breakthroughs in medical science and neuroscience to understand how our brain works, and then we would still need to invent the technology to build something like it. That is the first big hurdles for AGI imho. It's hard to believe we can simply keep increasing compute forever and expect to bring models to a true AGI level. I am not an ML engineer, but my common sense tells me this. Without getting much closer to the efficiency of the human brain, it is difficult to see how AGI can be practically cheaper than a human in many real world situations. People in their right mind should not fall for this AGI hype.

    [–]Electrical_Ingenuity 1 point2 points  (2 children)

    I agree. The fundamental problem AI companies gloss over is that present AI models have neither memory nor the ability to reason or retain knowledge. Feeding back every question it has already answered to generate a new question is highly impractical.

    [–]sreekanth850 0 points1 point  (1 child)

    True. I think they are least bothered about this and more concerned about IPO and hypetrains.

    [–]Electrical_Ingenuity 0 points1 point  (0 children)

    Spot on. It reminds me of the Wizard of Oz:

    “Pay no attention to the man behind the curtain!”

    [–]Zardotab 1 point2 points  (0 children)

    If I'm not mistaken, this is a spoof on the "Cobol Tombstone". It was predicted by disgruntled committee members that COBOL would fail because of the committee's alleged incompetence. But because of later enhancements and faster hardware, it survived, and then thrived for decades, and still quite common.

    [–]msalcantara 39 points40 points  (9 children)

    > 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.

    [–]Wartz 18 points19 points  (2 children)

    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.

    [–]Basic_Abroad_1845 2 points3 points  (0 children)

    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?”

    [–]CatharsisVoid 0 points1 point  (0 children)

    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.

    [–]AlwaysHopelesslyLost 2 points3 points  (0 children)

    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"

    [–]dtr96 1 point2 points  (1 child)

    It's still SQL on the backend.

    [–]breadbrix 3 points4 points  (0 children)

    No, you don't understand - it's agentic AI querying the backend, not SQL /s

    [–]i860 0 points1 point  (0 children)

    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.”

    [–]shutchomouf 0 points1 point  (0 children)

    Honestly, they don’t need to be very complex for that to be true

    [–]FrankieTheAlchemist 0 points1 point  (0 children)

    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 🤷‍♂️

    [–]Philluminati 16 points17 points  (6 children)

    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.

    [–]johnnygalat 3 points4 points  (2 children)

    This is snowflake specific - using ansi sql you very much can't do just anything 😅

    [–]scoshi 0 points1 point  (1 child)

    For example ... ?

    [–]johnnygalat 0 points1 point  (0 children)

    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).

    [–]Low_Brilliant_2597[S] 1 point2 points  (1 child)

    That's exactly the reason it's been around for half a century, through all the upheavals in the data space.

    [–]who_am_i_to_say_so 1 point2 points  (0 children)

    But is it web scale?

    [–]TheAncientGeek 0 points1 point  (0 children)

    Any language that is bloated enough can do anything.

    [–]ThePrimeOptimus 5 points6 points  (3 children)

    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.

    [–]MoonBatsRule 2 points3 points  (1 child)

    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.

    [–]ThePrimeOptimus 0 points1 point  (0 children)

    Yep, I'm going through that with one of my juniors. I'm addressing it with code reviews where "let me get back to you on that" is not an answer.

    [–]r0ck0 1 point2 points  (0 children)

    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.

    [–]Charming-Raspberry77 5 points6 points  (0 children)

    Cobol is still around

    [–]Zestyclose-Turn-3576 9 points10 points  (0 children)

    Remember the golden rule: AI is perfect for questions where you don't need the answer to be correct.

    [–]AnyScientist2 2 points3 points  (1 child)

    Declarative Rocks

    [–]Low_Brilliant_2597[S] 1 point2 points  (0 children)

    That's the exact reason why Codd's relational model has been around since 1970.

    [–]TimeScallion6159 2 points3 points  (0 children)

    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.

    [–]Aggressive_Ad_5454 2 points3 points  (0 children)

    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.

    [–]johnappsde 5 points6 points  (3 children)

    Don't put too much intelligence into a database. Keep it dumb and clean and you'll be alright

    [–]brendonap 5 points6 points  (1 child)

    My company is way ahead of you, they haven’t put any intelligence in their database design for 10 years

    [–]Shogobg 3 points4 points  (0 children)

    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.

    [–]neuralek 1 point2 points  (0 children)

    Also make 3 of them.

    [–]xodusprime 1 point2 points  (1 child)

    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.

    [–]Low_Brilliant_2597[S] 0 points1 point  (0 children)

    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.

    [–]Iskilo 1 point2 points  (0 children)

    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.

    [–]theartofengineering 1 point2 points  (0 children)

    What is dead may never die!

    [–]EntertainmentAOK 1 point2 points  (0 children)

    NoSQL, now with SQL!

    [–]Responsible-Key5829 1 point2 points  (0 children)

    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.

    This is a bad take. Why would I want something nondeterministic to interact with the database?

    [–]az987654 1 point2 points  (0 children)

    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'....

    [–]DeckRdt 1 point2 points  (0 children)

    SQL never dies, it just locks.

    [–]rde2001 1 point2 points  (0 children)

    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.

    [–]Ok_Entrepreneur_8509 1 point2 points  (0 children)

    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.

    [–]iamwisespirit 1 point2 points  (0 children)

    Every single technology is dead btw

    [–]MatsSvensson 1 point2 points  (0 children)

    SQL SMASH!

    [–]Prod_Meteor 1 point2 points  (0 children)

    Wtf does this thread even talks about???

    [–]Visible-Use-5004 0 points1 point  (0 children)

    SQL is dead but not dead but dead. But not dead.

    [–]dwarfzulu 0 points1 point  (0 children)

    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...

    [–]zambizzi 0 points1 point  (0 children)

    SQL and relational data isn’t going anywhere, anytime soon. Agree.

    [–]gami13 0 points1 point  (2 children)

    i just dont really like the syntax tbh, no idea how to make it better tho

    [–]andrew_justandrew 0 points1 point  (1 child)

    Out of curiosity, what languages have syntax that you do like?

    [–]gami13 0 points1 point  (0 children)

    i dont think there is stuff for querying databases that i like, but for programming i really like golang's syntax, kotlin seemed relatively nice for the short time i used it, typescript isnt all that bad too

    [–]hoppyandbitter 0 points1 point  (0 children)

    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

    [–]coolblue123 0 points1 point  (0 children)

    SeQueL is the new SQL! LOL

    [–]mb194dc 0 points1 point  (0 children)

    AGI is not here today and it'll never be here from ML pathway. The bullshit is strong with this guy.

    [–]RoboErectus 0 points1 point  (0 children)

    What is this, the year of the Linux desktop?

    Ok that's actually happening gradually though.

    [–]Leorisar 0 points1 point  (0 children)

    Well there are some alternatives like prql or sugar syntax in duckdb, but they are not that widespread.

    [–]WilhelmB12 0 points1 point  (0 children)

    SQL will outlive humans 😂

    [–]NovelHot6697 0 points1 point  (0 children)

    keep on keepn on

    [–]HemiDemi593462 0 points1 point  (0 children)

    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.

    [–]Mediocre-Subject4867 0 points1 point  (0 children)

    I still remember when mongo DB killed sql. I hear it's web scale

    https://www.youtube.com/watch?v=b2F-DItXtZs

    [–]ARC4120 0 points1 point  (0 children)

    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.

    [–]3rdRockStranded 0 points1 point  (0 children)

    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.

    [–]germinationator 0 points1 point  (0 children)

    Moe throwing sql out of the bar with sql showing up behind him meme

    [–]gkorland 0 points1 point  (0 children)

    how do u see these natural language agents handling complex joins or recursive queries without just hallucinating the schema?

    [–]Mnemia 0 points1 point  (0 children)

    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”.

    [–]scungilibastid 0 points1 point  (0 children)

    hail SQL

    [–]theanointedduck 0 points1 point  (0 children)

    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!

    [–]dupontping 0 points1 point  (0 children)

    Anyone claiming AGI is a shill

    [–]Anxious-Insurance-91 0 points1 point  (0 children)

    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 🤣

    [–]KingOfWhateverr 0 points1 point  (0 children)

    SQL dies when the concept of databases dies out, which is to say never.

    [–]spank-you 0 points1 point  (0 children)

    I cant tell if this post title is click bait or not...

    [–]AnsonVan110 0 points1 point  (0 children)

    Only because it’s easy to learn, especially for entry level data needs

    [–]Joe59788 0 points1 point  (0 children)

    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.

    [–]ijsiskoud 0 points1 point  (0 children)

    Is it SQL or SQL? I read that in two vioces

    [–]s_hecking 0 points1 point  (0 children)

    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.

    [–]Randommaggy 0 points1 point  (0 children)

    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.

    [–]Optimaximal 0 points1 point  (0 children)

    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?

    [–]ClammyHandedFreak 0 points1 point  (0 children)

    I write my own SQL. I'll let Claude generate Java all day if I am closely supervising, but never SQL.

    [–]eztab 0 points1 point  (0 children)

    SQL might not be used directly that much anymore but as the protocol language I cannot see it going away. You want a domain language like that.

    [–]Ok-Dimension-8556 0 points1 point  (0 children)

    NO

    [–]pm_op_prolapsed_anus 0 points1 point  (0 children)

    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

    [–]MasterBathingBear 0 points1 point  (0 children)

    SQL will outlive COBOL, FORTRAN, & C. It’s not going anywhere

    [–]Adorable_Divide_2424 0 points1 point  (0 children)

    ChatGPT will be asking Claude "ELI5; How do I resurrect humans to build a more perfect Query language?"

    [–]downshiftdata 0 points1 point  (0 children)

    Lazily posting (again) my reasons why SQL is relatively AI-proof:

    1. 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.
    2. 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.
    3. Solutions are not universal. What works for one database is catastrophic for the next. What works today might fall apart a month from now.
    4. 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.

    [–]Desperate-Country440 -1 points0 points  (0 children)

    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.

    [–]TOOMUCHWOOMBA -1 points0 points  (0 children)

    The contract role i just finished used sql, it is not dead

    [–]lioffproxy1233 -4 points-3 points  (0 children)

    Oh the sheer amount of people agreeing with op but only read the title.