Live data from Hacker News

Show HN: Select Star SQL, an interactive SQL book

selectstarsql.com

61–70 of 121 posts

Re: Show HN: Select Star SQL, an interactive SQL book

#61
post #11

This is good intiative. We need to simplify pedagogy. On a related note, I always found the syntax of SQL to be great. Someone told me that simplicity of SQL made relational databases even more popular. It is one of the best designed language where even someone new to the field won't feel intimidated. I'm surprised designers of SQL haven't won the Turing Award yet.

I teach SQL to financial people and, for the most part, it isn't too bad. When I get to joins, I teach a subset of SQL where all joins are done through INNER JOIN / LEFT JOIN syntax and that helps a lot. Joins are the part that everyone has trouble with.

> Joins are the part that everyone has trouble with.

There is significant problem-solution mismatch in joins and some other SQL constructs which are therefore semantically quite controversial in many use cases:

https://github.com/asavinov/bistro#why-column-orientation

Re: Show HN: Select Star SQL, an interactive SQL book

#62
post #46

Earlier quoted context omitted.

I teach SQL to financial people and, for the most part, it isn't too bad. When I get to joins, I teach a subset of SQL where all joins are done through INNER JOIN / LEFT JOIN syntax and that helps a lot. Joins are the part that everyone has trouble with.

Can you explain when to really use a lateral join?

In Postgresql, Lateral Joins enable function chaining for set returning functions. ie you can feed the results of earlier srf function to the arguments of following function. This gets around one of Postgresql most glaring omissions - table valued parameters. Is incredibly useful once you get used to them.

Re: Show HN: Select Star SQL, an interactive SQL book

#64
post #39
post #11

This is good intiative. We need to simplify pedagogy. On a related note, I always found the syntax of SQL to be great. Someone told me that simplicity of SQL made relational databases even more popular. It is one of the best designed language where even someone new to the field won't feel intimidated. I'm surprised designers of SQL haven't won the Turing Award yet.

I write a lot of sql and it is generally a nice language. But for my taste the language is to close to English and therefore redundant and inconsistent in an annoying way. Example: Select x from tbl ... Delete from tbl ... Update tbl set x=... Why change the word order?

Yes,I also suggest standards committee allow the option of putting FROM clause first - this would make it easier for beginners to grok what’s going on and enable better tooling such as auto-complete.

Re: Show HN: Select Star SQL, an interactive SQL book

#65
Congratulations! I love this kind of interactive tutorials as their helping more and more people learning stuff without a boring book and no exercises.

That said: Doesn't work in Firefox and Edge? Common, are we back in 1998? Sorry for the rant, but please don't do that.

Re: Show HN: Select Star SQL, an interactive SQL book

#66
post #11

This is good intiative. We need to simplify pedagogy. On a related note, I always found the syntax of SQL to be great. Someone told me that simplicity of SQL made relational databases even more popular. It is one of the best designed language where even someone new to the field won't feel intimidated. I'm surprised designers of SQL haven't won the Turing Award yet.

I agree except one thing: SELECT cols FROM table. This should really be FROM table SELECT cols as every modern SQL editor will then be able to show you a list of available columns.

See LINQ. There they had the opportunity to fix it and it works just great.

Re: Show HN: Select Star SQL, an interactive SQL book

#67
post #66
post #11

This is good intiative. We need to simplify pedagogy. On a related note, I always found the syntax of SQL to be great. Someone told me that simplicity of SQL made relational databases even more popular. It is one of the best designed language where even someone new to the field won't feel intimidated. I'm surprised designers of SQL haven't won the Turing Award yet.

I agree except one thing: SELECT cols FROM table. This should really be FROM table SELECT cols as every modern SQL editor will then be able to show you a list of available columns. See LINQ. There they had the opportunity to fix it and it works just great.

I mean, it works either way. Once you type the column names, it can guess the table name easily.

I use DataGrip at work and it can complete the column names without knowing the table name, so it ends up not being a problem.

Re: Show HN: Select Star SQL, an interactive SQL book

#68
post #50
post #43

Earlier quoted context omitted.

It's 2018 and we're back in 1998 where website proudly showed "Optimized for Internet Explorer".

In 1998 sites might looks bad but at least user can still read the content. In 2018, some sites just refuses to work for anything but Google Chrome.

In 1998 you had to be running Windows. Now you can run any OS, even if the browser you have to use for a certain site isn't your favorite. It's an improvement.

People have always wanted to use "the web" as an application platform. It didn't work that well in 1998, but it's pretty good now. Progress has been made.

Post reply on HN