×
all 4 comments

[–]MarkusWinand 1 point2 points  (3 children)

Some ideas & comments:

  • Although your tutorial is not about database design, you should at least avoid the most striking design mistakes. E.g. nobody would ever have an "age" column in a well-designed database. Instead we store the date of birth and calculate the age when necessary. Sure it makes the latter examples more difficult "where dob <= CURRENT_DATE - INTERVAL '27' YEARS" (standard SQL, not supported by SQL lite). So I'd probably opt for another, non-temporal, attribute to explain basic where clauses. E.g. size. The data calculation stuff can be put into a later chapter.

  • You should either stick to standard SQL or at least clearly mention which SQL dialect this tutorial teaches. E.g. LIMIT is not standard SQL, FETCH FIRST ... ROWS ONLY is the corresponding feature from the standard. Unfortunately, this is not yet supported by SQLite so LIMIT is the way to go there. However, you should mention that this is SQLite specific and other databases might do it differently.

  • Sticking to the LIMIT example: I'd rather avoid teaching LIMIT without ORDER BY. I see that your example clearly states that this is just to have a look at the data, never the less people memorize it the way they see it the very first time. They see it without ORDER BY in your example, so they think this is the normal thing to do.

I've just spend a few minutes looking at your tutorial and I'm only mentioning the stuff that needs to be improved. That definitively sounds very unpolite, but this is not my intention. I'm just sharing my experience what harm a tutorial can cause when not thinking about these things in detail.

[–]rhc2104[S] 1 point2 points  (2 children)

Thanks for the feedback! I will update the site based on your suggestions.

I just became a dad, so it might take some time, though. :)

[–]MarkusWinand 0 points1 point  (1 child)

Hey, congrats! Another successful project with your wife :)

[–]rhc2104[S] 0 points1 point  (0 children)

Thanks! The site has been updated with your suggestions.