Live data from Hacker News

Learn SQL Once, Use It for 30 Years

fagnerbrack.com

31–40 of 243 posts

Re: Learn SQL Once, Use It for 30 Years

#31

>The Only Programming Language Built on Mathematics, Not Fashion As a modern array language D4M is the natural successor for SQL [1]. D4M is based on mathematics like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2]. You can achieve 100M database inserts pe…

There is no SQL successor: SQL is here to stay.

Applying the Lindy effect [1]: after half a century of SQL we can expect it to survive for at least as long.

Disruption/displacement of SQL is like attempting to replace email. It's not going to happen. At best an alternative technology can carve out a small niche (and there's nothing wrong with that).

[1]: https://en.wikipedia.org/wiki/Lindy_effect

Re: Learn SQL Once, Use It for 30 Years

#32
post #19

Additionally learn stored procedures. Helps simplify complex SQL queries and no need to waste network traffic on data that client side is never going to use, and waste CPU cycles processing it. Yes, what about database portability? I am on my 50s and it only mattered on a single project, which was anyway a middleware for application servers.

> Additionally learn stored procedures. For sure, but have a solid grounding in set theory to go with it. I've dealt with so many poorly-performing stored procedures that ended up being written as iteration over a CURSOR when they could have been done with sets. Programmers who don't grok set theory reach for iterative constructs which, while they work fine, are an impedance mismatch with SQL.

At least in that case you can refactor the stored proc to be more performant without pushing application changes.

Re: Learn SQL Once, Use It for 30 Years

#33

>The Only Programming Language Built on Mathematics, Not Fashion As a modern array language D4M is the natural successor for SQL [1]. D4M is based on mathematics like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2]. You can achieve 100M database inserts pe…

The power of SQL is not because it is "based on mathematics" - it's because anyone (really, anyone, even with the most basic English skills) could understand it quickly enough to start using it productively with not much technical knowledge. Business analytics, managers of all sorts, manual QA people could grasp the basics in a minute and more complex queries within a few hours. It is very user-friendly and such tools win over anything else. Each time I see an overengineerd/overcomplicated solution that is hard to read/understand - I know it's only "good luck" to the creators.

Re: Learn SQL Once, Use It for 30 Years

#35

>The Only Programming Language Built on Mathematics, Not Fashion As a modern array language D4M is the natural successor for SQL [1]. D4M is based on mathematics like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2]. You can achieve 100M database inserts pe…

The only one? As opposed to ... Haskell, LISP/Scheme in the original SICP version, and proof assistant languages like Lean.

Re: Learn SQL Once, Use It for 30 Years

#36
post #19

Additionally learn stored procedures. Helps simplify complex SQL queries and no need to waste network traffic on data that client side is never going to use, and waste CPU cycles processing it. Yes, what about database portability? I am on my 50s and it only mattered on a single project, which was anyway a middleware for application servers.

> Additionally learn stored procedures. For sure, but have a solid grounding in set theory to go with it. I've dealt with so many poorly-performing stored procedures that ended up being written as iteration over a CURSOR when they could have been done with sets. Programmers who don't grok set theory reach for iterative constructs which, while they work fine, are an impedance mismatch with SQL.

Agreed, however that applies to SQL in general.

I have seen DBAs make wonders without changing queries, only by adding the right set of indexes.

Re: Learn SQL Once, Use It for 30 Years

#37
post #30

> If you are a junior developer, “learn SQL properly” is the most valuable 40 hours you can spend. Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans. That investment pays you back at every job, in every stack, for decades This is the power of low-level reasoning. Today, even for a junior developers, even if they have AI that solves syntax problems, SQL teaches you to reason and…

A couple of sites worth checking out to level up, both by Markus Winand:

https://modern-sql.com/

https://use-the-index-luke.com/

Re: Learn SQL Once, Use It for 30 Years

#38
I’ve always felt that SQL is somewhat easy to grasp for basic queries, but gets complex and difficult for even moderate to higher complexity use cases. My eyes glaze over when I read long stored procedures that someone else has written. Any recommended resources to go from beginner/beginner-intermediate to advanced?

Re: Learn SQL Once, Use It for 30 Years

#39
> SQL is the only programming language

SQL is not a programming language. You do not write programs in SQL. It's a declarative language (or set-of-sublanguages).

> a working developer can learn once and > use for 30 years without rewriting their mental model.

There is any number of long-living languages which satisfy this.

Plus, SQL it's not even really a single language, because the spec changes, and is huge, and few people know it fully; and the dialects have non-trivial differences; and if you switch DBMSes, you often switch SQL dialect. In that sense, it is very much like other programming languages which evolve, like C++ or Fortran or even C.

Re: Learn SQL Once, Use It for 30 Years

#40
post #27

>The Only Programming Language Built on Mathematics, Not Fashion As a modern array language D4M is the natural successor for SQL [1]. D4M is based on mathematics like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2]. You can achieve 100M database inserts pe…

I feel you missed the point of the article :)

I feel like the point of the article was "hey chatgpt write me an article about SQL"
Post reply on HN