Introduction to Relational Databases

Thank you for signing up for the course! We look forward to working with you and hearing your feedback in our forums.

Need help getting started?


Course Resources

Software to install

You can start this course without installing any software. However, to complete Lessons 3 and 5, you will need to install a virtual machine (VM) on your computer. This VM gives you an environment including an SQL database (PostgreSQL) and the code templates for the Lesson 3 web forum project and the Lesson 5 game tournament project.

See here for installation instructions.

Course syllabus

Lesson 1: Data and Tables

In this lesson, you'll learn about how relational databases let you structure data into tables. You'll learn about the importance of unique keys and relationships between tables.

Lesson 2: Elements of SQL

In this lesson, you'll begin learning SQL, the Structured Query Language used by most relational databases. You'll learn about the select and insert statements, the basic operations for getting data out of a database and putting data into a database. You'll learn about the operators and syntax available to get the database to scan and join tables for you.

Reference notes for Lesson 2

Lesson 3: Python DB-API

In this lesson, you'll learn how to access a relational database from Python code. You'll use a virtual machine (VM) running on your own computer to run a Python web application, and adapt that application to use a database backend. Then you'll learn about some of the most common security pitfalls of database-backed applications, including the famous Bobby Tables (SQL injection attack). This lesson also covers the SQL update and delete statements.

Reference notes for Lesson 3

Lesson 4: Deeper Into SQL

In this lesson, you'll learn how to design and create new tables and databases. You'll learn about normalized design, which makes it easier to write effective code using a database. You'll also learn how to use the SQL join operators to rapidly connect data from different tables.

Reference notes for Lesson 4

Lesson 5: Final Project

In this project, you'll use your Python and SQL knowledge to build a database-backed Python module to run a game tournament. You'll design the database schema and write code to implement an API for the project.


Thanks to Trish McCallister for massive video editing awesomeness,
Calvin Hu and Justine Lai for shooting the live video,
Kim Dryden for organizing all the things,
Adarsh Nair, Eduardo Medina, Susan Smith, Philip Mallory, Jee Kang for reviewing and testing the course,
Mike Wales for the sneaky JavaScript in lesson 3,
Trish, Kim, Mike, Andy Brown, Cameron Pittman, Calvin Hu, and Lorenzo Brown for help with the scripts!