Editor’s Image
For years, Harvard’s CS50 class—of all Introduction to computing, taught by Prof. David J. Malan has helped students around the world get started in computing and begin their development journey. While CS 50 is an introduction to computer science, there are specialized tracks in Python, ai, and more.
As you may have guessed, the team has released a Introduction to Databases with SQL course—or CS50SQL—to help you learn how to query databases, design your own, and much more.
If you aspire to be a data professional, you need to build a solid foundation in databases and SQL. And this course will help you get there.
Taught by carter zenkehe Introduction to Databases with SQL The course is organized into seven modules spanning seven weeks. Modules contain lectures and associated problem sets based on real-world data sets.
For each module, you can follow this approach:
- Watch the conferences
- Review the notes
- Try the examples presented at the conference.
- Solve the module problem set.
You can solve the problem sets in VS code for CS50. Like codespaces, it offers you VS Codde in the cloud, adapted for CS50. So there is a lot of learning and practice as you progress through the course.
Now that we know what the course is about, let’s review its content.
Note: Modules 1 to 7 below correspond to weeks 0 to 6 of the course.
The first module Consult databases It begins by discussing the need to move beyond spreadsheets and how data is stored in a relational database. Then he moves on to the basics of database querying with SQL. Topics covered include:
- SELECT statement
- LIMIT and WHERE Clause
- Understanding NULLs
- LIKE keyword
- Ranks
- SORT BY
- Added features
See the module at consulting.
He Relate database tables The module builds on the previous module and goes beyond a single database table. You will learn to work with multiple tables and understand the relationships between them. Topics covered include:
- Entity-relationship diagrams (ER diagrams)
- Types of relationships: one-to-one, one-to-many, and many-to-many relationships
- Keys: primary and foreign keys
- Subqueries
- IN keyword
- Unions
- Set operations: INTERSECT, UNION and EXCEPT
- GROUP BY
See the module at relative.
So far you have learned how to work with databases, query single and multiple tables to answer questions. But how do you create such a database yourself? This module Database schema design covers exactly that. You will learn to design databases from scratch including concepts such as:
- Create database schemas
- Concepts of normalization and relationship of database tables.
- Creating tables
- Data types and storage classes.
- Restrictions on tables and columns.
- Altering tables
See the module at design.
By now you know how to retrieve data from databases using queries and design your own databases from scratch. This module Write to databases It teaches you:
- Insert records into databases
- Import data from CSV files to a database
- Delete and update records
See the module at writing.
The next module in View database tables is a deep dive into creating database views and their benefits covering:
- what views are they
- Creating views
- Advantages of creating views
- Common Table Expressions (CTEs)
- Division
- Protect databases
- Soft removals
See the module at visit.
He Database query optimization The module focuses on using indexes to speed up database queries and the trade-offs associated with indexes. Topic covered includes:
- Create a database table index
- Create indexes on multiple tables
- Space and time compensation
- Partial indexes on a subset of rows.
- Transactions and race conditions.
See the module at optimizing.
So far in this course, you have used SQLite. This final module on Scale databases introduces you to MySQL and PostgreSQL. It lays a foundation for these widely used RDMSs on which you can build. This module covers:
- Create and modify tables
- MySQL stored procedures
- Stored procedures with parameters.
- Work with PostgreSQL
- Access control statements
- SQL injection attacks
See the module at climbing.
All of the topics covered in this course are important if you are considering a career in data. Introduction to Databases in Data Science provides an overview of the relevance of databases and essential database skills.
Overall, this is a great course for building a solid foundation in databases and SQL. As a data professional, you will use SQL all the time. But you’ll also realize that mastering SQL is an ongoing journey. And for this, practice is your best friend!
If you’re ready to hone and flex your SQL muscles, check out this compilation of the 7 best platforms for practicing SQL.
Bala Priya C. is a developer and technical writer from India. He enjoys working at the intersection of mathematics, programming, data science, and content creation. His areas of interest and expertise include DevOps, data science, and natural language processing. He likes to read, write, code and drink coffee! Currently, he is working to learn and share his knowledge with the developer community by creating tutorials, how-to guides, opinion pieces, and more.