This is CS50’s introduction to databases using a language called SQL. You’ll learn how to create, read, update, and delete data with relational databases, which store data in rows and columns.

You’ll also learn how to model real-world entities and relationships among them using tables with appropriate types, triggers, and constraints.

Then you’ll learn how to normalize data to eliminate redundancies and reduce potential for errors. You’ll learn how to join tables together using primary and foreign keys. You’ll learn how to automate searches with views and expedite searches with indexes. Learn how to connect SQL with other languages like Python and Java.

This course begins with SQLite for portability’s sake and ends with introductions to PostgreSQL and MySQL for scalability’s sake as well. Assignments inspired by real-world datasets.

💻 Slides, source code, and more at https://cs50.harvard.edu/sql/

✏️ Carter Zenke teaches this course.

❤️ Try interactive Frontend courses we love, right in your browser: https://scrimba.com/freeCodeCamp-Frontend (Made possible by a grant from our friends at Scrimba)

⭐️ Course Contents ⭐️
⌨️ (0:00:29) Introduction
⌨️ (0:02:35) Querying
⌨️ (1:21:49) Relating
⌨️ (3:03:28) Designing
⌨️ (4:24:52) Writing
⌨️ (4:24:52) Viewing
⌨️ (7:30:27) Optimizing
⌨️ (8:59:19) Scaling

source

Categories: Blog

46 Comments

@baalralph · October 31, 2026 at 11:50 am

Please how do i set up my vscode like his, including all the necessary files so that i can practice. i am now at querying

@SadiyaMiustaphaUmar · October 31, 2026 at 11:50 am

This channel is outstanding I really appreciate the effort.

@ReshamJaiswal-l8y · October 31, 2026 at 11:50 am

I haven't seen such a bad course and such a bad structure of a course in a really long time.
I suggest a better place to lear SQL if you have a Udemy subscription – 15 Days of SQL: The Complete SQL Masterclass 2026 by Nikolai Schuler. The course has a 4.6 rating and I've personally done it too. I could crack my coding rounds with this course and with some leetcode practice.

For learning 'Query Optimization', I will share a course here as soon as I find a good one.

They seem to be deleting my comments. I don't think its ideal to do that cause your audience should be able to have an opinion because people are investing their time in doing a 11 hr course and if it gets them no where, then its really a bad experience.

@VaishnaviSinha-i5v · October 31, 2026 at 11:50 am

start on 27-10-2026

@kingslayergaming8751 · October 31, 2026 at 11:50 am

if anyone is wondering timestamp for VIEWING is 6:08:20

@suzansevat8186 · October 31, 2026 at 11:50 am

Day 1 – 01:21:51
Day 2 – 02:38:50
Day 3 – 03:02:58

@pokectzz · October 31, 2026 at 11:50 am

Day #1. 2:17:48 COMPLETE (I was planning to do 1hr everyday and I did 2hr cuz I have completed the first hr a long time ago )

@yvarigop · October 31, 2026 at 11:50 am

Day 1: 01:21:00

@ninevolt · October 31, 2026 at 11:50 am

33:00 on 2026 Oct 22

@Sali-ma12344 · October 31, 2026 at 11:50 am

20.10.26
DAY 1: 1:01:40
DAY 2: 2:02:22

@LynxQuas · October 31, 2026 at 11:50 am

1:21:45

@alishahmaria4838 · October 31, 2026 at 11:50 am

9:22am 17.10.26

@georgimmitev · October 31, 2026 at 11:50 am

1:25:55

@-rw8mw · October 31, 2026 at 11:50 am

Man. This guy is a younger version of Mr. Malan

@thinhofficial6457 · October 31, 2026 at 11:50 am

30/09/2026 29:57

@aliiubaidd · October 31, 2026 at 11:50 am

The person teaching is such a good person. He is addressing every question even in between of the session!

@VillS0L0 · October 31, 2026 at 11:50 am

28 Sept 26, > Completed

@CodeMatrix-c3x · October 31, 2026 at 11:50 am

thnaks for providing us with awesome classes form lecturers of havard the videos might be long but it is worth it

@BatlhabanyeTshepoMorewabone · October 31, 2026 at 11:50 am

Completed ✔️
Expect for the final project 😅

@amalshashigupta4356 · October 31, 2026 at 11:50 am

Window function??

@zwm-gb9jl · October 31, 2026 at 11:50 am

听说你是最好的数据库课程。

@manuell.5696 · October 31, 2026 at 11:50 am

keep learning guys! AI is just a tool and we must persever that it stays that way. We need to keep learning and educating ourselves! this course is amazin :3

@mdsarfarazalam8713 · October 31, 2026 at 11:50 am

started 14 sept,
Day 1:2:40💯;

@aicoholic00 · October 31, 2026 at 11:50 am

Which terminal is he using throughout the demonstration?

@usernick48 · October 31, 2026 at 11:50 am

some people just don't have teaching skills

@m.a.ngaming6981 · October 31, 2026 at 11:50 am

1:16

@abhijithram222 · October 31, 2026 at 11:50 am

day 1 – 1:21:47

@andersonlee404 · October 31, 2026 at 11:50 am

did this guy teach for 10 hours straight ? he seems to be wearing the same outfit

@andersonlee404 · October 31, 2026 at 11:50 am

dude didn't understand the first two questions at 20 ish min marks

@B.KanaiyaAswani · October 31, 2026 at 11:50 am

did he give the database or should we take some db from the internet?

@iamtechboy3298 · October 31, 2026 at 11:50 am

Can somebody help how to download this in HD (free)? I have internet issue

@iamtechboy3298 · October 31, 2026 at 11:50 am

Thanks CS50 and freecode camp!

@Diegoalface · October 31, 2026 at 11:50 am

:: INTRODUCTION ::
00:01:06 • Introduction to databases and SQL for data management.

:: QUERYING ::

Theory and tools
00:02:48 • Tables ‣ Spreadsheets ‣ Database
00:12:52 • Database + Editor + SQLite

Practice
00:16:23 • SELECT
00:22:11 • LIMIT
00:24:22 • WHERE [ = | != | <> ]
00:29:30 • NOT
00:30:40 • AND | OR | ()
00:34:32 • IS NULL | IS NOT NULL
00:37:06 • LIKE [ % | _ ]
• Using Ranges
00:47:22 • Operators [ < | > | >= | <= ]
00:50:00 • BETWEEN … AND …
00:50:56 • Compounding range conditions
00:55:43 • ORDER BY … ASC/DESC
• SQL Aggregate Funtions
01:04:27 • Intro
00:05:38 • AVG (average)

@user-pe8ev6gw7g · October 31, 2026 at 11:50 am

DATABASES IN 2026: https://youtu.be/Yg65f-QyIuk?is=SLpLX6Esnba6Oyba. ❤❤

@AdityaKumar-ji8dk · October 31, 2026 at 11:50 am

Just completed it today.
It will help you a lot to understand SQL in depth.
You can definitely go with this course if you have time in hands.
I completed it in 15 days with consistency.

@Donald77BS · October 31, 2026 at 11:50 am

4:03:51 Diagram should have Visits on the many side of the relationships. Riders and Stations should be on the one side of the relationship to Visits.

@Donald77BS · October 31, 2026 at 11:50 am

3:51:55 Even better add Date to "composite" key to make the rows unique. An artificial key here is not helpful, IMHO. As a BI guy, this looks like a Fact (Visits), with Dimensions (Rider, Station, Calendar)

@Shakhs_is_Aksh · October 31, 2026 at 11:50 am

1:14 david beckham?

@user589-l4u · October 31, 2026 at 11:50 am

thank you liked the course

@谭恒春 · October 31, 2026 at 11:50 am

Where can i get the db files of this course?

@user589-l4u · October 31, 2026 at 11:50 am

I tried using MySQL and it does not work.
I tried installing the extension in VSCode and that did not work either
What else can I do ?

@SoulLovesMu · October 31, 2026 at 11:50 am

day 1: 53:33

@oliverhouston4497 · October 31, 2026 at 11:50 am

Help! Unable to load the longlist.db in the terminal.

@dang_nh · October 31, 2026 at 11:50 am

2:34:28

@user589-l4u · October 31, 2026 at 11:50 am

what exactly is a trigger ?

@pouyanmehdibeik9529 · October 31, 2026 at 11:50 am

THANKS FOR THIS CONTENT

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *