Live data from Hacker News

Why you should learn SQL

executeprogram.com

31–40 of 137 posts

Re: Why you should learn SQL

#31

You should learn SQL because it's likely to be a very different language to the ones you already know. In SQL you don't tell the DB how to get the data (for loops and pointers) but what the result should look like, and the DB figures out an execution plan. This style is well worth practising and appreciating.

> and the DB figures out an execution plan.

And then you spend the next hour trying to decipher the plan and work out how to get it to do something that isn't insanely slow.

Re: Why you should learn SQL

#32

SQL is going to eventually die because of its three-pronged relationship model that implies query-time complexity. Learn it if you want, but especially backend and analytics people would be better off learning Gremlin or Cypher. Edit: downvoting this is not going to make it untrue.

For simple queries, row adjacency will beat the graph hands down. And RSBMSs are hard to beat for transactional processing.

Re: Why you should learn SQL

#33

I've spent most of my career hoping that something - anything that's better than SQL will come along and replace it. It's like FORTRAN, except FORTRAN has had the decency to stay in use where it's really the best choice. But SQL is out there, like Clippy. "Hey, I see you're collecting some data. SELECT TRUE FROM HELP WHERE COLLECTING_DATA IS TRUE

The closest that many have come to is to develop ORM libraries. LINQ + EntityFramework Core is my favorite.

He said better than SQL.

Re: Why you should learn SQL

#34

SQL is going to eventually die because of its three-pronged relationship model that implies query-time complexity. Learn it if you want, but especially backend and analytics people would be better off learning Gremlin or Cypher. Edit: downvoting this is not going to make it untrue.

Eventually is a long time. SQLite is committed to supporting its file format out to 2050 and it's the recommended format for data archival by the Library of Congress. I suspect SQL will still be going strong long after my final exit().

Thing is, it's pretty neat in many respects (simple enough to do simple things easily, surprisingly flexible), and I say that as someone who really likes graph databases.

Re: Why you should learn SQL

#35
post #26

I've spent most of my career hoping that something - anything that's better than SQL will come along and replace it. It's like FORTRAN, except FORTRAN has had the decency to stay in use where it's really the best choice. But SQL is out there, like Clippy. "Hey, I see you're collecting some data. SELECT TRUE FROM HELP WHERE COLLECTING_DATA IS TRUE

Nobody else has invented any other declarative language it seems. Come on aspiring post-docs, do your thing and launch a new programming language. If MIT can launch Julia someone can launch a language that's not SQL.

Like Kusto?

https://docs.microsoft.com/en-us/azure/data-explorer/kusto/c...

https://docs.microsoft.com/en-us/azure/data-explorer/

Re: Why you should learn SQL

#36

> The SQL langauge is old, strange, and important. I've always found it strange that something hasn't replace SQL, particularly for traditional 'web' client/server applications. But SQL is probably the only technology/language that has survived in the past 30 years of my career. 99% of their SQL databases probably don't require transactions and ACID behaviour. There nearly always needs to be a layer to convert the ro…

> 99% of their SQL databases probably don't require transactions and ACID behaviour

99% of applications do not require multi-statement transactions or rollbacks, but basic ACID is hard to live without (at least the 'D' and 'C' parts).

You probably don't need a massively parallel transaction system, perhaps you just need to isolate writers out but the fact is that most of what you need comes for "free" with a standard SQL database + failovers.

It's not that no one was fired for picking it, but that people can be hired to fix it when it doesn't quite work as well as it should.

Re: Why you should learn SQL

#37

> The SQL langauge is old, strange, and important. I've always found it strange that something hasn't replace SQL, particularly for traditional 'web' client/server applications. But SQL is probably the only technology/language that has survived in the past 30 years of my career. 99% of their SQL databases probably don't require transactions and ACID behaviour. There nearly always needs to be a layer to convert the ro…

> 99% of their SQL databases probably don't require transactions and ACID behavior.

Until they do. Developer mind share for the data storage aspect of their applications is much simplified due to ACID.

Just look at the documentation of NoSQL databases. A lot of code is for integrity checks and verification.

Re: Why you should learn SQL

#38
Working on a new SQL client https://arctype.com based on this very thesis! SQL tooling is rough tho. My first intro was pgadmin and MySQL workbench which I feel serves to turn a lot of beginners off. If you have to get Python 3 packaging right to even start writing queries.. it’s just a very tough journey.

My other gripe is about ‘intermediate SQL’ - CTEs, window functions, stored procedures. Intentional practice was needed for me to be able to use those! Unlike Python where you pretty much become a functional programmer without realizing it over time.

Re: Why you should learn SQL

#39

I've spent most of my career hoping that something - anything that's better than SQL will come along and replace it. It's like FORTRAN, except FORTRAN has had the decency to stay in use where it's really the best choice. But SQL is out there, like Clippy. "Hey, I see you're collecting some data. SELECT TRUE FROM HELP WHERE COLLECTING_DATA IS TRUE

Kusto, https://docs.microsoft.com/en-us/azure/data-explorer/

Re: Why you should learn SQL

#40

You should learn SQL because it's likely to be a very different language to the ones you already know. In SQL you don't tell the DB how to get the data (for loops and pointers) but what the result should look like, and the DB figures out an execution plan. This style is well worth practising and appreciating.

> and the DB figures out an execution plan. And then you spend the next hour trying to decipher the plan and work out how to get it to do something that isn't insanely slow.

Maybe create foreign keys and indexes in your Rails migrations
Post reply on HN