Live data from Hacker News

The Rise of SQL:the second programming language everyone needs to know

spectrum.ieee.org

61–70 of 139 posts

Re: The Rise of SQL:the second programming language everyone needs to know

#61
post #8

Somewhat tangential to the article, but why is SQL considered a programming language ? I understand that's the convention according to the IEEE and Wikipedia [1], but the name itself - Structured Query Language - reveals that its purpose is limited by design. It's a computer language [2] for sure, but why programming ? [1] https://en.wikipedia.org/wiki/List_of_programming_languages [2] https://en.wikipedia.org/wiki/C…

Also SQL is not turing complete. I see it more as a descriptive language like e.g. html is a language but not a programming language.

It can do loops and recursion. It can use as much memory as it is allowed. It can do general programming via functions and stored procedures.

Re: The Rise of SQL:the second programming language everyone needs to know

#62
SQL is great, but what is even better is a SOTA client. https://github.com/elixir-dbvisor/sql the BEAM can give you superpowers that no other platform can, handle massive concurrency with the performance that rivals bare metal and c https://erlangforums.com/t/elixir-dbvisor-sql-needs-a-sota-p...

Re: The Rise of SQL:the second programming language everyone needs to know

#63
post #25
post #5

I've loved and used Django ORM and SQLAlchemy for many years. It got me a long way in my career. But at this point I've sworn-off using query-builders and ORMs. I just write real, hand-crafted SQL now. These "any db" abstractions just make for the worst query patterns. They're easy and map nicely to your application language, but they're really terrible unless you want to put in the effort to meta-program SQL using w…

Indeed, Dapper, myBatis, jOOQ,...

Dapper is fantastic, and I'm happy to see it getting some love. It does exactly what I want: provides strongly-typed mapping and protects against SQL injection. It makes it easy to create domain-specific repositories without leaking anything.

In contrast, every company I've joined that used Entity Framework had enterprise products that ended up being a tightly coupled mess from IQueryable being passed around like the world's favourite shotgun.

Re: The Rise of SQL:the second programming language everyone needs to know

#65
post #8

Somewhat tangential to the article, but why is SQL considered a programming language ? I understand that's the convention according to the IEEE and Wikipedia [1], but the name itself - Structured Query Language - reveals that its purpose is limited by design. It's a computer language [2] for sure, but why programming ? [1] https://en.wikipedia.org/wiki/List_of_programming_languages [2] https://en.wikipedia.org/wiki/C…

What is your definition of 'programming language'?

It should have arrays, and loops and conditionals.

Re: The Rise of SQL:the second programming language everyone needs to know

#66
post #34

Earlier quoted context omitted.

Anytime this topic comes up, this opinion is invariably at the top of the comments. However I've never seen a non-trivial application made this way. Mind sharing one? More than the query generation, I think people reach for ORMs for static typing, mapping, migrations, transactions, etc. I'm not doubting that it can be done, I'm just curious to see how it's done.

Every single time. Where are these developers? Orms are a god send 98% of the time. Sure, write some SQL from time to time, but the majority of the time just use the ORM.

> Orms are a god send 98% of the time.

People who write percentages make shit up 98% of the time.

Or in other words: Source?

Re: The Rise of SQL:the second programming language everyone needs to know

#67
post #56

Earlier quoted context omitted.

genuinely curious, can you steel man stored procedures? views make intuitive sense to me, but stored procedures, much like meta-programming, needs to be sparingly used IMO. At my new company, the use of stored procedures unchecked has really hurt part of the companies ability to build new features so I'm surprised to see what seems like sound advice, "don't use stored procedures", called out as a cargo cult.

My hunch is that the problems with stored procedures actually come down to version control, change management and automated tests. If you don't have a good way to keep stored procedures in version control, test them and have them applied consistently across different environments (dev, staging, production) you quickly find yourself in a situation where only the high priests of the database know how anything works, an…

> My hunch is that the problems with stored procedures actually come down to > version control

Git? (and migrations)

> change management

Again. Just like any other code.

> and automated tests.

Just write an automated test like you write any other kind of test?

Re: The Rise of SQL:the second programming language everyone needs to know

#68
post #33
post #32

Earlier quoted context omitted.

I agree. Claude Code writes superb SQL queries for very complex data. I was dealing with PostgreSQL recently, and it improved the query from 30 seconds to 5 seconds. I couldn't figure it out myself.

How do you present the interrelations between the tables when you're dealing with complex table structures?

Use a tool to do that. Try https://visualdb.com it can send the relationships and table definitions to AI.

Re: The Rise of SQL:the second programming language everyone needs to know

#69
post #16

> the second programming language everyone needs to know Do they though? I've been writing SQL for over twenty years, and my experience is that LLMs have been better at writing it than I am for at least most of 2025, for most use cases. I have zero doubt that I will only be writing SQL when I want to for fun no later than sometime 2027.

> I've been writing SQL for over twenty years, and my experience is that LLMs have been better at writing it than I am for at least most of 2025

Wow, bad career choices?

Post reply on HN