Data Management and Data Systems

Introduction to the use, design, and implementation of database and data-intensive systems.

Course Overview


This course covers how to use databases in applications, first principles on how to scale for large data sets and how to design good data systems.

A few key topics:

— Introduction to relational data model, relational database engines, and SQL.

— How to scale systems for large data sets on servers and server clusters

— How to design good schemas based on dependencies, normal forms so we build and evolve good applications. This will include indexes, views and transactions.

The class will culminate in a hands-on programming project in SQL+Python — a key part of the course — where you will query, visualize and predict from terabytes of data on BigQuery, a popular cloud database part of Google Cloud Platform.

Key Dates


Lectures: Tues/Thurs
4:00 PM - 5:00 PM
NVIDIA Auditorium
Exam#1: Thursday, October 28
Details TBA
Exam#2: Thursday, December 9
Details TBA

Schedule

Event Date Description Course Materials
Lecture 1 9/21 Tu Why Databases?
Concepts: Data models, DB systems overview
[Introduction: Why databases?][PDF]
[Project outline][PDF]
[Systems Primer][PDF]
Reading List:
[AWS: Data Lakes and Analytics]
[AWS: What is a Data Lake?]
Lecture 2 9/23 Th SQL I
Concepts: Schemas, Systems, Select-From-Where
[Example SQL][PDF]
[SQL - Part I][PDF]
Project 1
Released
9/27 Mon See Course Info for general submission information and the regrade policy. [Project 1 Handout]
[project1_submission.py]
[Getting started with BigQuery]
Lecture 3 9/28 Tu SQL II
Concepts: Joins, Set operators, Subqueries
[SQL Deep Dive][PDF]
Homework 1
Released
9/28 Tu [CS145 Fall 2021 Homework 1]
Lecture 4 9/30 Th SQL III, Advanced
Concepts: Grouping, Aggregations, Nested queries
[SQL Deep Dive (Same Slides as Previous Lecture)][PDF]
Section 1 10/1 Fri 9:30 AM — 10:20 AM
Remote [Zoom Link]
[Section 1 slides]
Lecture 5 10/5 Tu Scale: Indexing and IO Model
[Scale Slides][PDF]
Lecture 6 10/7 Th Sorting, Building Indices Part 1
[Sorting, Building Indices Slides][PDF]
Project 1 Due 10/8 Fri
Lecture 7 10/12 Tu B+ Trees
Query Optimization Part 1
[B+ Trees][PDF]
[Query Optimization Slides][PDF]
Homework 1 Due 10/12 Tu
Homework 2
Released
10/13 Wed [CS145 Fall 2021 Homework 2]
Project 2
Released
10/13 Wed See Course Info for general submission information and the regrade policy. [Project 2 Handout]
[Project 2 colab]
Lecture 8 10/14 Th Query Optimization Part 2 [Query Optimization Slides][PDF]
Section 2 10/15 Fri 9:30 AM — 10:20 AM
Remote [Zoom Link]
[Section 2 slides]
Lecture 9 10/19 Tu Systems Design: Putting it all together [Systems Design Slides][PDF]
Lecture 10 10/21 Th Guest Lecture
Ramanathan V. Guha on Datacommons & Knowledge Graphs at Google
Lecture 11 10/26 Tu Exam Review [Midterm review][PDF]
Homework 2 Due 10/26 Tu
Exam #1 10/28 Th
Project 2 Due 11/1 Mon
No Class
Democracy Day
11/2 Tu
Project 3
Released
11/2 Tue See Course Info for general submission information and the regrade policy. [project3_template.ipynb]
[project3_ml_warmup.ipynb]
[High Level Rubric for Project 3]
[Project 3 Handout]
Homework 3
Released
11/4 Th [CS145 Fall 2021 Homework 3]
Lecture 12 11/4 Th Transactions [Transactions Slides][PDF]
Lecture 13 11/9 Tu Guest Lecture
Dr. Girish Baliga on Presto at Uber
Michael Li on Data/Blockchain at Coinbase
Project 3
Proposal Due
11/10 Wed
Lecture 14 11/11 Th Transactions [Transactions Slides][PDF]
Section 3 11/12 Fri 9:30 AM — 10:20 AM
Remote [Zoom Link]
[Section 3 slides]
Lecture 15 11/16 Tu Transactions [Transactions Slides][PDF]
Lecture 16 11/18 Th Big Schemas and Design Theory [Big Schemas][PDF]
[Design Theory][PDF]
Homework 3 Due 11/19 Fri
Homework 4
Released
11/20 Sat [CS145 Fall 2021 Homework 4]
Section 4 11/29 Mon 9:30 AM — 10:20 AM
Remote [Zoom Link]
[Section 4 slides]
Lecture 17 11/30 Tu Design Theory Continued [Design Theory][PDF]
Lecture 18 12/2 Th Exam Review [Exam Review][PDF]
Project 3 Due 12/3 Fri
Homework 4 Due 12/3 Fri

Course Logistics and Policies


Prerequisites CS 103 and CS 107 (or equivalent)

Grading Projects: 50% (10 + 15 + 25), Exam #1: 15%, Exam #2: 25%, Homework: 10%.

We will be offering extra credit for in class participation and high quality answers to fellow student questions in piazza.

Ed Join our Ed to receive important announcements and get answers to your questions.

Homeworks There will be 4 biweekly homework assignments, worth 10% of your final grade, that accompany the material being taught in class. They will be graded on completion basis — meaning that you will receive full credit as long as you submit the assignment on time and receive a grade above 70%. You will submit your homeork through Gradescope. No late days can be used on homework.
The homework assignments reflect the exam material, so it is in your best interest to complete them thoroughly. Aside from preparing you for the exam, they will assess and reinforce your understanding of the material.

Sections There will be 4 optional discussion sections that will accompany each homework assignment. The sections will be recorded and uploaded to Canvas. The slides will be posted online.

Exam Dates
  • Exam #1: Thursday, October 28th
  • Exam #2: Thursday, December 9th

Late Days You are allowed a total of two late days shared between all project deadlines. You do not lose any credit when using a late day. If you run out of late days and submit after the deadline, you receive a 0. (Late days can only be applied for projects.)

Lectures Lectures occur on Tues/Thurs 4:00-5:00 p.m. in NVIDIA Auditorium. NOTE that while attendance is not mandatory, we will be giving out extra credit for students with insightful in-class participation.

Lecture Videos Lecture videos will be recorded and posted on Canvas.

Textbook There is no required textbook, but for students who want additional resources, we recommend the following two:
  • Database Systems 2nd Edition by Garcia-Molina
  • First Course in Database Systems 3rd Edition by Ullman

Accomodations If you need an academic accommodation based on a disability, you should initiate the request with the Office of Accessible Education (OAE). The OAE will evaluate the request, recommend accommodations, and prepare a letter for faculty. Students should contact the OAE as soon as possible and at any rate in advance of assignment deadlines, since timely notice is needed to coordinate accommodations. If you need OAE accommodations for exams, please notify us at least 7 days (ONE week) prior to the exams.

Honor Code/Collaboration Policy


Students must adhere to The Stanford Honor Code and The Stanford Honor Code as it pertains to CS courses.

We encourage students to form study groups. Students may discuss and work on homework problems in groups. However, each student must write down the solution independently, and without referring to written notes from the joint session.

It is an honor code violation to copy, refer to, or look at written or code solutions from a previous year, including but not limited to: official solutions from a previous year, solutions posted online, and solutions you or someone else may have written up in a previous year. Furthermore, it is an honor code violation to post your assignment solutions online, such as on a public git repo.

The teaching staff will be using plagiarism detection software and if we have reason to believe that you are in violation of the honor code, we will follow the university policy to report it.

Projects


Group Size The first two projects are individual only, but the third project you are allowed to work in teams of two.

Project Submissions You will submit your projects via Gradescope. Sign up for Gradescope using your Stanford email address and student ID. The course code is P5BVKB. Each assignment will include specific instructions regarding what files to submit.

Regrade Policy If you think that we've made a grading mistake or that the work you submitted should be regraded, submit a regrade request on Gradescope within one week of receiving your grade. Be sure that you prepare a short and convincing argument on Gradescope about why you think your work was incorrectly graded – we reserve the right to ignore your regrade request if you don't provide a justification. If you submit a regrade request, we reserve the right to regrade your entire assignment. This means that your overall score could go down.

Staff


Instructor

shiva
Shiva Shivakumar

Teaching Assistants

ailyn
Ailyn Tong (Head)
ada
Ada Zhou
aman
Aman Bansal
amber
Amber Yang
cara
Cara Van Uden
qirui
Qirui Zhou
sanjari
Sanjari Srivastava
silvia
Silvia Gong
sharmila
Sharmila Nangi

Office Hours


For OH that will be held online, students should sign up at https://queuestatus.com/queues/1675 .