This repository contains my personal solutions, notes, and experiments for CS50's Introduction to Databases with SQL (HarvardX / edX).
The structure follows the official weekly progression of the course, aligned strictly with the problem sets as released by CS50.
A brief walkthrough of the relational database architecture designed for FiveLib, a centralized technical documentation platform.
- Watch the presentation here: CS50 SQL Final Project Video
Objective: Build fluency in reading queries, basic filtering, and thinking in sets.
Objective: Apply filtering, grouping, joins, and real-world investigation logic.
Objective: Work with multi-table relationships and real datasets.
Objective: Defensive querying and handling imperfect data.
- Don’t Panic!
- Meteorite Cleaning
Objective: Complex joins, investigative reasoning, and storytelling with SQL.
- Census Taker
- The Private Eye
- Bed and Breakfast
Objective: Views, abstractions, and reusable query logic.
- In a Snap
- your.harvard
Objective: Apply SQL concepts via another language and complete a capstone.
- Don’t Panic! (Sentimental) — Python or Java
- From the Deep
- Happy to Connect (Sentimental)
- FP Final Project
- Final Project
Each week or conceptual block is organized into directories following the progression above. SQL files contain only the queries required by each problem set, following CS50’s constraints.
The database files .db used in the exercises are not included in this
repository.
These databases are provided by CS50 / HarvardX as part of the official course materials and are excluded here for ethical and academic integrity reasons.
All SQL queries in this repository were written and tested against the official course databases within the authorized learning environment.
This repository provides two ways to run the CS50 SQL tools: using Docker (automated) or a Local Python Virtual Environment .
Regardless of the method, create your environment variables file to store your credentials:
touch .env
Edit the .env file:
GITHUB_USER=your_user_here
GITHUB_TOKEN=ghp_your_token_here
Use this method if you want to run the tools directly on your Arch Linux host:
Create and activate the virtual environment:
python -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
This method leverages Expect to automatically inject your GitHub Token, bypassing manual login prompts.
Build the Image:
docker compose build --no-cache
Run the Environment:
docker compose run --rm cs50-sql
Once your environment is ready (either via .venv or inside the Docker container), run the commands normally:
Example:
check50 cs50/problems/2024/sql/meteorites
To quickly jump into the Docker environment from any terminal, add this alias to your ~/.bashrc or ~/.zshrc:
alias sql='docker compose run --rm cs50-sql'
The solutions, queries, and technical results contained in this repository represent my own work and understanding developed while completing the course exercises.
However, the course content, problem statements, datasets, and instructional materials are the intellectual property of CS50 / Harvard University / HarvardX (edX) and are used here strictly for educational and non-commercial purposes, in accordance with the course’s academic integrity and usage policies.
This repository is intended as a personal study record and technical portfolio, not as a redistribution of official course materials. Solutions are published after independent completion of the exercises.
