TDM 20100: Project 9 — Fall 2026

Introduction to Databases (Part 1)

Project Objectives

Motivation: Starting with this project, we will learn about databases, which allow you to write queries about data.

Context: We will focus on SQLite. Once you understand how to make queries in SQLite, you will have a strong foundation that can be used to learn other database resources, such as MySQL.

Scope: SQLite queries that do not need JOIN

Learning Objectives
  • We will learn how to make SQLite queries on one table at a time (without using the JOIN)

Dataset

  • /anvil/projects/tdm/data/movies_and_tv/imdbSept2026.db

Use 4 cores for this project!

First read our notes about SQL here:

Question 1

  1. How many people from the IMDB database were born in the same year as you?

  2. How many were born in the year that Dr Ward was born (1976)?

  3. Find your favorite actor or actress in the IMDB database. Check their nconst on www.imdb.com (in the URL for their page) and compare it with their entry in the name table. What year were they born?

Question 2

  1. During the years 1980 to 1990, how many people (from the name table) were born in each year? For each year, show the number of people who were born in each year. It probably makes the most sense to sort your results by year.

  2. During the years 2000 to 2020, how many people (from the name table) died in each year? Again, show the number of people who died in each year, and sort your results by year.

Question 3

In which years was the tvSeries House of Cards broadcast? Hint: You likely need to limit the results so that the titleType is tvSeries.

Question 4

  1. Lookup the nconst for Whoopi Goldberg on IMDB from the URL of her www.imdb.com webpage. Using her nconst, how many entries does she have in the principals table?

  2. She appears altogether with 6 different types of category, namely: actress, archive_footage, director, producer, self, writer. How many times does she appear in each type of these categories?

Question 5

  1. Consider the tvSeries The West Wing. How many episodes of this tvSeries aired altogether?

  2. Now, consider your favorite tvSeries: how many episodes does your favorite show have?

Submitting your Work

Please make sure that you added comments for each question, which explain your thinking about your method of solving each question. Please also make sure that your work is your own work, and that any outside sources (people, internet pages, generative AI, etc.) are cited properly in the project template.

Prior to submitting your work, you need to put your work into the project template, and re-run all of the code in Jupyter Lab and make sure that the results of running that code is visible in your template. Please check the detailed instructions on how to ensure that your submission is formatted correctly. To download your completed project, you can right-click on the file in the file explorer and click 'download'.

Items to submit
  • firstname_lastname_project9.ipynb

It is necessary to document your work, with comments about each solution. All of your work needs to be your own work, with citations to any source that you used. Please make sure that your work is your own work, and that any outside sources (people, internet pages, generative AI, etc.) are cited properly in the project template.

You must double check your .ipynb after submitting it in gradescope. A very common mistake is to assume that your .ipynb file has been rendered properly and contains your code, markdown, and code output even though it may not.

Please take the time to double check your work. See here for instructions on how to double check this.

You will not receive full credit if your .ipynb file does not contain all of the information you expect it to, or if it does not render properly in Gradescope. Please ask a TA if you need help with this.