SQL

Khan Academy’s SQL resources are an excellent way to learn about SQL and databases. The site provides well-written explanations interspersed with narrated coding in a live-coding environment where you can watch an instructor edit and run code and/or edit and run code yourself to try things out and actively explore topics.

  • Some of the earlier sections may be review of things you have already used; look through those parts and use them to strengthen your understanding and possibly fill in details.
  • Specifically for database design and more complex queries, work through the Relational Queries in SQL section.

SQLBolt is another solid resource for learning or reviewing SQL, again with interactive lessons and exercises that let you try out SQL statements in your browser.

  • Specific to database design, read the Creating Tables lesson, which provides a useful overview of data types and table constraints.
  • Additionally, work through the two lessons on JOINs (lesson 6 and lesson 7), which describe database normalization and the use of multiple forms of the JOIN syntax.

Select Star SQL cleanly and carefully walks you through a variety of SELECT statements and their uses, including JOINs. Again, examples and exercises all run live in your browser. (As a content warning, the examples and exercises use a dataset of Texas death row inmates and their final statements.)

DB Fiddle is a useful site for trying out SQL syntax, similar to JSFiddle for HTML/CSS/Javascript. You can enter SQL for the database schema, inserts, and updates on the left and execute SQL statements against that database on the right, all live within your browser. For CS 253, select the “SQLite” engine in the dropdown at the top left of the page; it’s closest to the engine you are using in your applications.