Lesson 01 Free preview
Introduction to Module 2
Introduction to Module 2
Focus on databases, SQL mastery, and practical exercises.
What this module is about
Module 2 covers databases and SQL — the single most important technical skill for any data role. Data analysts, BI developers, analytics engineers, and data engineers all write SQL every day. If you master one thing in this course, master this.
The module goes beyond query syntax. You will learn what a database actually is, how to connect to one with real tools, how data is modeled inside it, how databases run in the cloud, and where NoSQL and modern analytical engines like DuckDB fit in. By the end, a database is not a mystery box. It is a tool you know how to open, inspect, and query.
Why SQL is non-negotiable
Look at any job posting for a data analyst or data engineer. SQL is in almost every one. There is a simple reason: nearly every company stores its business data in relational databases and data warehouses — PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery, Redshift. SQL is the one language they all speak.
SQL has been around for about fifty years, and it is not going away. BI tools generate SQL under the hood. dbt models are SQL. Even Spark and many machine learning workflows accept SQL. It is the highest-return investment a beginner can make, and interviews reflect that: nearly every entry-level data interview includes a live SQL exercise.
What you will learn
What a database really is
Tables, rows, columns, keys, and how a database engine stores and retrieves data. You will learn the difference between the database, the database server, and the client tool you use to talk to it — a distinction that confuses many beginners.
Connecting to databases
Real work starts with a connection: host, port, database name, username, password. You will practice connecting with tools like DBeaver and psql, so a connection string stops being scary. This is a small skill that many self-taught learners never practice, and it shows on day one of a job.
Data models
How tables relate to each other. You will meet normalization (used by transactional systems like a web shop’s backend) and dimensional models with facts and dimensions (used by analytics). Understanding the difference between OLTP and OLAP — systems built for transactions vs systems built for analysis — explains why data warehouses exist at all.
Databases in the cloud
Modern analytics runs on cloud warehouses: Snowflake, BigQuery, Redshift, and managed Postgres services like Amazon RDS. You will see what changes in the cloud (someone else runs the server) and what stays the same (the SQL).
Visualization on top of databases
How BI tools connect to a database and turn queries into charts — the bridge to Module 3.
NoSQL and DuckDB
Not everything is a relational table. You will get a working overview of NoSQL databases like MongoDB and Redis, and when they are the right choice. You will also meet DuckDB, a small analytical engine that runs on your laptop and queries CSV and Parquet files with plain SQL. It is one of the best practice tools available today, and it is free.
Common beginner mistakes
- Learning SQL only in a browser sandbox. Online exercises are fine for syntax, but jobs require connecting to real databases with real tools. Do both.
- Memorizing syntax instead of thinking in sets. SQL describes the result you want, not the steps to compute it. Practice reading a question and sketching which tables and joins answer it.
- Skipping JOINs and GROUP BY. These two features are what interviews test. SELECT and WHERE alone will not get you hired.
- Ignoring data models. A query is easy once you understand the schema. Analysts who cannot read a schema write wrong queries that look right.
- Trying to learn five database systems at once. Learn PostgreSQL well. The others are 90 percent the same.
How to work through this module
- Install PostgreSQL locally or use Docker (covered in Module 0), and install DBeaver as your client.
- Follow each lesson and repeat every query yourself. Watching is not learning; typing is.
- Break things on purpose. Wrong join keys, missing GROUP BY columns — errors teach faster than success.
- After the DuckDB lesson, load a public CSV dataset and answer five questions about it with SQL, without a tutorial.
Give this module more time than any other. SQL fluency compounds: every later module — BI, ETL, cloud — assumes you can query data without thinking hard about the syntax.
Next steps
- See all lessons in Module 2: Databases and SQL.
- Practice on a real dataset with a pet project — a SQL portfolio project is strong interview material.
- Check where SQL fits in your plan in Getting your first data job.