Live data from Hacker News

Ask HN: Junior SQL developers – How do you learn SQL?

news.ycombinator.com

21–30 of 46 posts

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#21
post #14
post #6

Not so much about how I learned but how I teach. Whenever I want to explain how one can do things in SQL I pull up a google/excel sheet and write down some sample data that resembles the problem. When multiple tables are involved I just write the samples in two different locations within the same sheet. After that I can just jot down the resulting table below (without writing the actual sheet commands) and maybe some…

Yep...a plain spreadsheet or tables do the trick. It helps get away from the frustration of not knowing SQL and helps think just in table terms.

This is exactly how I teach SQL to my students.

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#23
I maintain the most popular SQLite3 library for a common programming language (2 million downloads per month).

The only reason I learned SQL is to perform SQL injections and hack shit..

Now I get to fix bugs in SQLite3 on a monthly basis.. I guess karma exists after all lol.

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#24
T-sql with pencil and paper. Visualize the problem with tables and relationships (boxes and lines with crows feet). Going through normal forms may be valuable but I like to tell them to just jump to entities and relationships. Once they can draw a “map” of their dB, and it’s usually much simpler than they first expected, then code it out on the nearest computer box.

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#27

I maintain the most popular SQLite3 library for a common programming language (2 million downloads per month). The only reason I learned SQL is to perform SQL injections and hack shit.. Now I get to fix bugs in SQLite3 on a monthly basis.. I guess karma exists after all lol.

It is karma indeed =)

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#28

T-sql with pencil and paper. Visualize the problem with tables and relationships (boxes and lines with crows feet). Going through normal forms may be valuable but I like to tell them to just jump to entities and relationships. Once they can draw a “map” of their dB, and it’s usually much simpler than they first expected, then code it out on the nearest computer box.

So you are talking about the db structure itself. How would you approach the SELECT part? All those nested sub-queries, CTEs, and complex EXISTS cases?

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#29

CMU database youtube channel: https://youtube.com/c/CMUDatabaseGroup Postgres documentation: https://www.postgresql.org/docs/ Being forced to solve a challenging problem keeps me going regardless of what it is. I am not a huge fan of exercises without an end result.

The youtube channel looks very advanced. Definitely need to go over it in detail.

When you say solving tasks without an end goal what do you mean? Like what would be the most blocker for you from practicing writing SQL queries?

Re: Ask HN: Junior SQL developers – How do you learn SQL?

#30

This is about how I learned it many years back, but it worked well for me. (1) I was starting with Oracle, so I read through Oracle's Database Concepts ( https://docs.oracle.com/cd/B19306_01/server.102/b14220/toc.h... ). This contains unnecessarily deep technical detail (which I skimmed), but I learn more easily if I have a strong footing in the concepts so I don't feel disoriented. For example, it was helpful to und…

Is there anything (any context, environment, or mindset) that could stop you from practicing writing SQL and learning the language?
Post reply on HN