DS105 2025-2026 Autumn Term Icon

πŸ–₯️ Week 08 Lecture

SQL Fundamentals for Data Projects

Author

Dr Jon Cardoso-Silva

Published

20 November 2025

πŸ“ Logistics

Time and Location: Thursday, 20 November 2025, 16:00 - 18:00, CLM 5.02

Today we explore databases and SQL, the language of databases. We’ll learn how to combine information from multiple DataFrames and tables, a skill essential for your ✍️ Mini-Project 2 work.

πŸ“‹ Preparation

  • Review the ✍️ Mini-Project 2 tactical plan to understand how this lecture supports your assignment.

πŸ““ Lecture Materials

Today’s lecture uses slides with a demonstration notebook for live coding. All materials will be available in your Nuvolos workspace under the week08/ folder.

🎬 Lecture Slides

Use keyboard arrows to navigate. Select the slides below or view fullscreen.

If you prefer to have a PDF version of it:

IMDb 2025 Database

The lecture uses a curated IMDb database containing titles that ended in 2025. Download it to follow along:

Lecture Demonstration Notebook

This notebook accompanies the slides with code examples exploring the IMDb database.

Available on Nuvolos after the lecture: week08/W08-NB01-Lecture-SQL-Intro.ipynb

Download the notebook to follow along:

πŸ’‘ Key Concepts

  • Databases: Structured storage systems that organise data into connected tables, avoiding repetition while maintaining relationships
  • SQL: The language for querying databases. We’ll learn SELECT, WHERE, ORDER BY, and JOIN operations
  • pd.merge(): Connects normalised DataFrames using common keys, enabling analysis across multiple data sources
  • Normalisation: Separating data into multiple tables to remove repetition while keeping connections through keys
  • Tidy Data: One table represents one thing. Ask: β€œWhat does a single row describe?”

πŸ”– Appendix

Post‑Lecture Actions

  • Review the lecture slides and notebook
  • Complete the πŸ’» W08 Lab (SQL queries with IMDb)
  • Continue working on ✍️ Mini-Project 2 (due W10)
  • Attend W08 Lab and drop-in sessions

Useful Links

Looking Ahead

  • Tomorrow (W08 Friday): SQL queries lab practice with an OpenSanctions database
  • Mini-Project 2: Due Week 10 Wednesday 8 pm
  • Week 09: Advanced visualisation and communicating findings