I have spent the past couple weeks working on the SQL lesson for my database class. For the first (of four) practice sets on SQL commands, I felt like SQL was really kicking my butt. I didn’t have a good grasp of all the commands and how to put them together.
The lectures on SQL in my class were very … dry. They mostly consisted of the professor introducing a new command and then demonstrating how it worked, over and over, in different queries. There weren’t any breaks for us to try little problems. And there wasn’t any overview that helped us learn how to break down a problem. I imagined something like, “If you’re trying to find this kind of information, think about using this combination of commands,” or perhaps, “You need to find this information. Can you imagine how to build up to the right query? Start by formulating the query for X.” Instead, the lectures went more like this: “Let’s learn the JOIN command; here is how it works for this query. And here is how it works for this query. And here is how …”
After watching nine different lectures about SQL commands, I wasn’t always sure where to look for information about the specific problem I was trying to solve. So I turned to teh intarwebs. I found two really nice resources:
The SQL tutorial on W3Schools wasn’t particularly helpful — it was a little too basic. But this quick reference is useful as a reminder of which commands are available and how each of them works.
I like the way this tutorial is set up. It has a lot of mini-problems that focus on mastering specific commands. I also liked how, when working on a problem, it sometimes showed the solution to a similar problem. It helped me get oriented and think about how to put the commands together to get certain results. I probably could have gotten the same thing from the class lectures, but I learn much better when I am asked to come up with the answer myself instead of just watching someone else solve the problem in front of me.
I also learned that sometimes I just need to take a break. After I finally got through the first problem set, I couldn’t imagine working on the next one. But when I sat down to do it the next day, I flew through the problems. I finally feel like I am getting a sense of how to work with SQL commands. I still haven’t tackled the challenge problem sets, but I am going to try them. And then I’ll move on to the next lesson: Relational Design Theory (supposedly the hardest section of this course). Wish me luck!