Live data from Hacker News

Learn SQL Once, Use It for 30 Years

fagnerbrack.com

101–110 of 243 posts

Re: Learn SQL Once, Use It for 30 Years

#101
I frankly can't agree more.

Learn SQL, learn the normal forms at least up to 3NF, profit.

I took an Oracle SQL class in High School in the very early 2000s and frankly it set me up for my career, despite never having touched actual Oracle SQL I've become the go to guy at every job I've had for optimizing queries and reviewing designs.

I read a book on how MySQL actually worked under the hood in the late aughts and it really went a long way towards the effort.

It's really not as hard as the complexity of modern ORM tooling likes to make it seem. That scares people away. It's an elegant language for a more elegant age.

I went to a talk like 10 years ago about how SQL will be displaced by Hadoop/MapReduce in the next 5 years. I posted on Twitter about it at the time like we'll see if that happens. Spoilers, it didn't. I can't even think of the last time I've heard someone invoke the name of Hadoop

Re: Learn SQL Once, Use It for 30 Years

#102

I think the pretext of this articles is ridiculous. Yes, SQL is based around relational algebra, but all programming languages are built on a theoretical foundation. And SQL is very much a "fad" language - it just somehow managed to stick around. The goal was not some sort of mathematical purity, but rather to built a natural language data interface (sounds like something currently very hyped?) and it failed spectacu…

> And SQL is very much a "fad" language - it just somehow managed to stick around. Probably because - despite it not being perfect - the only people who have been able to do it better are very slight variations of it like LINQ and Logica and GoogleSQL etc.

Edgar F. Codd did it better when he designed Alpha. It is his work that we still talk and dream about to this day. SQL won because it was the first implementation to be network-connected, which was far more important to industry than language.

Re: Learn SQL Once, Use It for 30 Years

#105
> Learn SQL Once, Use It for 30 Years.

Well, during those 30 years you'd have to learn a few additions that were added to the SQL standard, like "OVER / PARTITION BY", and maybe a few non-standard extensions like "QUALIFY".

There have been 11 modifications to the SQL standard since the initial SQL-86 ANSI standard of 1986.

Re: Learn SQL Once, Use It for 30 Years

#106
I've been using SQL for almost 40 years and I know for sure I will be using it for the next 20. Relational databases is about data sets used everywhere and SQL is the math behind it.

With AI it's even easier as it creates all the DB schema for me, all the dummy data to test my apps and all the complex queries needed.

Re: Learn SQL Once, Use It for 30 Years

#107
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…

The breakthrough for me was thinking in terms of sets and not in terms of "how would I do this imperatively."

If you see SQL where someone wrote a SELECT and is then using a cursor to loop through those results and do other queries, you've found the person who is still thinking imperatively.

Re: Learn SQL Once, Use It for 30 Years

#108
post #10

Just, for god's sake, move SELECT after GROUP BY, I beg you.

Current structure makes sense to me.

  SELECT .... what do I want
  FROM .... where is it 
  WHERE .... what filters do I want to apply
  GROUP BY .... how do I want it aggregated
Maybe it's just that I'm so used to it. I could see FROM being first, that would actually make a little more sense to me.

Re: Learn SQL Once, Use It for 30 Years

#109
post #54
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…

I find SQL a very thick "wrapper masking low-level logic". Think of the query planning, the index-maintaining, the upholding of guarantees, the writing-to-disk and caching that you are all not doing by using a RDBMS! I'd say SQL is a very high level language. "SQL teaches you to reason and approach problems logically" -- I kind of agree here. It teaches relational data mgmt. I think it is better to attack most softwa…

Yes, i think the right wording is something like "the power of understanding the concepts" or "having the right mental model" rather than "low level".

Re: Learn SQL Once, Use It for 30 Years

#110

> Learn SQL Once, Use It for 30 Years. Well, during those 30 years you'd have to learn a few additions that were added to the SQL standard, like "OVER / PARTITION BY", and maybe a few non-standard extensions like "QUALIFY". There have been 11 modifications to the SQL standard since the initial SQL-86 ANSI standard of 1986.

Very worthwhile additions in most cases IMO, and well worth the "continued education" required.
Post reply on HN