RELATIONAL-DATABASE COURSE GUIDE

Relational Database Design

A chapter-by-chapter readback of the free course by Beau Carnes on freeCodeCamp.org.

Length5:54:43
Chapters14
Modules4
Plain Markdown with clickable timestamps — drops into Obsidian, Notion or GitHub as-is.

The course emphasizes understanding relationships and how queries operate—not merely memorizing SQL syntax. Its examples follow a sci-fi store database from simple filters through linked product and review tables.

Who it's for
Read this guide if
  • You are new to relational tables and primary keys.
  • You want to practice basic SQL queries and aggregation.
  • You need to understand foreign keys and joins.
Skip ahead if
  • You already know SQL filtering, grouping, and joins.
  • You want a transcript-backed guide to later course sections not represented in these notes.
  • You are looking specifically for advanced query optimization or indexing instruction.
In brief
  • Runtime: 21,283 seconds (5 hours, 54 minutes, 43 seconds).
  • This guide summarizes 13 chapters in 4 modules.
  • Tools mentioned: SQLite Online and SQL scripts in a GitHub repository.
  • Level: introductory SQL and relational database concepts.
  • Topics in the documented chapters include filtering, aggregation, table changes, constraints, and joins.

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

Relational tables and querying basics

0:00

Tables, entities, and primary keys

A relational database stores data in tables representing entities or relationships. The product example shows how attributes become columns and how a unique product ID identifies each row.

10:03

A first SQL query

The course loads a prepared store database into SQLite Online and introduces its product table. A basic SELECT query uses FROM to choose a table and WHERE to filter products by price.

20:06

Filtering rows and selecting columns

Queries can return chosen columns, compare numeric values, and match quoted strings. The lesson also introduces combining conditions with AND or OR and notes that results have no guaranteed order without ordering instructions.

23:56

Aggregates and grouped results

Aggregate functions such as COUNT, AVG, and MAX summarize values across rows. GROUP BY applies those calculations to sets sharing a value, and the grouping column should appear in the output to make the results clear.

Creating and changing tables

33:42

Defining columns and constraints

CREATE TABLE defines columns, their data types, and a primary key. The example also explains NOT NULL and why a primary key cannot contain a missing value.

38:07

Altering and dropping tables

ALTER TABLE changes a table's structure, though supported operations vary between database systems. DROP TABLE removes the table and its data.

40:44

Inserting, deleting, and updating rows

INSERT adds rows using matching column names and values. DELETE removes rows matching a condition, while UPDATE changes selected columns in matching rows; without a filter, either operation affects every row.

Relationships and referential integrity

46:34

Primary keys, foreign keys, and redundancy

The product and review tables connect through product ID, used as a primary key in one table and a foreign key in the other. Keeping unrelated columns from being duplicated across tables helps avoid redundancy and data anomalies.

52:06

Foreign key constraints

A child table's foreign key should refer to an existing parent key. Constraints protect that relationship by rejecting invalid references and preventing parent changes that would leave dependent rows inconsistent.

Joining tables and understanding SQL

1:03:18

Joining products and reviews

A JOIN combines product and review records by matching their shared product ID with an ON condition. Table-qualified column names help identify the intended field when names overlap.

1:10:00

Inner, outer, and left joins

INNER JOIN keeps matching rows, while LEFT, RIGHT, and FULL OUTER joins preserve rows from one or both sides and can fill unmatched columns with NULL. Aliases can make duplicate column names easier to distinguish.

1:17:00

SQL as a way to express questions

The discussion argues that memorizing query forms is less useful than understanding relationships and how joins and filters work. SQL describes the desired result, while useful queries begin with knowing what information a real-world question requires.

1:20:14

Practice with meaningful data

The course connects relational thinking to practical tasks such as exploring business data and preparing dashboard inputs. It recommends learning how tables, keys, and data structure shape a query rather than focusing only on syntax.

1:29:00

Applying database design

The closing documented segment encourages building databases and working with realistic projects to understand data integrity and how schema choices affect queries. It also mentions resources for further study and practice.

Moment by moment

TimeWhy it matters
0:00Introduces entities, tables, primary keys, and the risks of combining unrelated data.
23:56Begins aggregation, including COUNT and grouped calculations.
46:34Shows how primary and foreign keys connect product and review tables.
1:03:18Demonstrates joining related tables using a shared key.
1:17:00Explains why understanding SQL concepts matters beyond memorizing syntax.

Do this next

  1. Load the example SQL script in SQLite Online and run a product filter using SELECT, FROM, and WHERE.
  2. Write a grouped COUNT query for products by manufacturer, including the manufacturer in the results.
  3. Create product and review tables linked by a foreign key, then query them with an explicit JOIN.

Common questions

What SQL basics does the documented course section cover?

It covers selecting columns, filtering rows, combining conditions, aggregation, and grouping results.

How does the example database connect products and reviews?

The product table uses product ID as its primary key, and the review table uses that ID as a foreign key.

What is the difference between an inner join and a left join?

An INNER JOIN returns matching rows from both tables. A LEFT JOIN keeps every row from the first table and fills unmatched columns from the second with NULL.

Which tools are mentioned for following the examples?

The transcript mentions SQLite Online and SQL scripts available in a GitHub repository.

Spot a mistake?

If you spot an error or an unclear timestamp, please report it so we can correct the guide. Every summary is hand-checked against the video.

More course guides