Databases
Welcome! This course introduces relational databases through a combination of conceptual study, SQL practice, and a running web application project.
You will study data, database systems, and the relational model, and then continue into querying, application-side database access, schema design, migrations, aggregation, transactions, normalization, and performance.
The practical thread of the course uses PostgreSQL, FastAPI, Jinja, and raw SQL so that the database stays visible throughout the course.
The first iteration of these materials is now ready, but we already know a few things that could be improved. The materials will be updated, at the latest, when the course is run at Aalto for the next time.
Course Parts
We recommend starting from the first one, but you can also browse around.View chapters
View chapters
- Overview
- The Database Design Process
- Reading a Case Description
- Practicing Subject Analysis
- Entities and Attributes
- Relationships, Cardinality, and Optionality
- Entity-Relationship Diagrams
- Testing a Design Against Its Questions
- Keys, Identifiers, and Stability
- Design Patterns and Anti-Patterns
- Documenting a Design
- Project Checkpoint
- Recap and Feedback
View chapters
- Overview
- Planning the Schema from the Design Package
- Creating Tables with SQL
- Constraints and Integrity Rules
- Practicing Schema Implementation
- Verifying the Schema
- Inserting, Updating, and Deleting Under Constraints
- Migrations and Seed Data
- Evolving a Schema Safely
- Project Checkpoint, Step 1: Designing Card Reviews
- Project Checkpoint, Step 2: Building the Card Review Page
- Recap and Feedback
View chapters
- Overview
- From Design Questions to Summary Questions
- Aggregate Functions
- Grouping and Filtering Groups
- Summaries Across Related Tables
- Practicing Summary Queries
- Readable Summary Queries
- Complex Summary Queries with CTEs
- Summary Queries in Applications
- Project Checkpoint: Building a Dashboard
- Recap and Feedback
View chapters
- Overview
- Transactions and Multi-Step Operations
- Concurrency and Isolation
- Normalization: From Anomalies to Normal Forms
- Denormalization as a Deliberate Trade-Off
- Indexes and Query Plans
- Practical Performance and Verifying Improvements
- Project Checkpoint: Building a Study Mode
- Project Checkpoint: Moving Cards Between Decks
- Recap and Feedback
- Looking Forward