SQL sucks out of context
Some things you just need to do in order to understand. SQL is one of them.
I spent this week getting my first exposure to databases — creating them, adding to them, querying them — all through PostgreSQL. What I had thought was a black box of confusion ended up being the easiest week that I’ve had at the Guild thus far.
So why did it suck? The first 3 days relied heavily on going through Khan Academy tutorials and writing small queries in their browser console. It all seemed pretty easy, but trying to learn databases void of any data to manipulate makes it harder than it needs to be. The query language itself is practically plain english, but having live data to manipulate makes it much easier to see if/when you’re not doing what you think you’re doing.
Skip to Thursday this week and I actually got to creating databases and importing CSV file dummy data to play around with in the terminal.
Random things I learned:
- Fun fact — if you have a multi-line query, you can press enter within your terminal and it will not execute until you close the parenthesis and enter our old friend semicolon.
I feel like I have a good grasp on basic SQL queries and can’t wait to get my hands on a more robust database to mess around with.