Intermediate

Approx. {{courseState.expectedDuration}} {{courseState.expectedDurationUnit}}

Assumes 6hr/wk (work at your own pace)

view course trailer
View Trailer

Course Summary

This course is a quick, fun introduction to using a relational database from your code, using examples in Python. You'll learn the basics of SQL (the Structured Query Language) and database design. You'll also learn to build and navigate a local database environment so you can continue to collect and investigate data on your own.

After taking this course, you'll be comfortable using relational databases to store, manage, and query data.

Why Take This Course?

SQL is very important, and not losing it's importance over time because of the ways database technologies evolve. Even NoSQL DB's lately are coming out with more or less SQL compatible ways of querying data.

Managing relational databases is one of the foundational skill sets on being a data analyst. Gaining these skills opens the opportunity to more confidently move forward with your data analysis projects.

Prerequisites and Requirements

You can read and write basic code in Python. This course uses programming exercises in Python. If you haven't worked with Python before, check out our course Programming Foundations with Python.

If you can understand this code (maybe with the help of the random module documentation), you know enough Python for this course:

import random

def ChooseTwice(items):
    a = random.choice(items)
    b = random.choice(items)
    return a, b

names = ["Alice", "Bob", "Charlie", "Debra"]
(one, two) = ChooseTwice(names)
if one == two:
    print "%s is happy!" % one
else:
    print "%s likes %s!" % (one, two)

You can use a command-line interface (terminal). Some of the exercises in this course involve using a Unix-style command-line interface to enter commands, run Python programs, and navigate directories.

If you have taken our course on Git and Github, the level of command-line use in this course is similar.

You don't need any previous database experience. This course is an entry-level introduction to relational databases.

You need a programming text editor (such as Sublime Text) installed on your computer. You should be able to use it to open and edit files of Python code.

See the Technology Requirements for using Udacity.

What Will I Learn?

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.

Problem Set 1

Lesson 2: Elephants 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.

Problem Set 2

Lesson 3: Deeper into SQL

In this lesson, you'll learn how to design and create new 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 SQL join operators and how to begin accessing your database using python.

Problem Set 3

Instructors & Partners