Databases
Relational modeling, SQL, indexing, transactions, and when to reach for NoSQL
- 8 lessons
- 6 hours
- Beginner
- Graded labs: 24
What you will learn
- Model entities as normalized tables (1NF to 3NF) with primary and foreign keys.
- Write SELECT queries with joins, aggregates, subqueries and CTEs.
- Explain how a B-tree index speeds up a query and read an EXPLAIN plan.
- Use transactions and isolation levels to prevent lost updates and dirty reads.
- Design backups, point-in-time recovery and replication that meet an RPO and RTO, and prove them with a restore.
- Choose between relational, document, key-value and graph stores for a given workload.
- Secure a database with parameterized queries, least-privilege roles, encryption and audit trails.
How you are assessed
Database skill is shown by queries that return the right rows quickly: labs run your SQL against real data through SQLite, quizzes test your design and isolation reasoning, challenges add hidden edge cases.
- Complete every Foundations lesson
- Average on first-try quizzes: at least 70%
- Graded lab exercises to pass: 3
- Challenges to solve: 1
- Lessons
Learn modeling and SQL
Complete every Modeling and SQL lesson.
- Quizzes
Design and reason
Average at least 70% on first-try quizzes about normal forms, indexes and isolation levels.
- Lab exercises
Write correct SQL
Pass at least 3 graded labs (joins, aggregates, indexes and transactions) run on SQLite.
- Challenges
Handle the edge cases
Solve one data challenge graded by hidden tests.
Curriculum
Modeling and SQL
Tables, keys, normalization, joins and aggregates, indexes and query plans, and transactions.
- 1.Relational Model & SQL Basics
Tables, rows, columns, keys and constraints, then the everyday SQL verbs: SELECT, INSERT, UPDATE, DELETE, WHERE, ORDER BY and LIMIT. You also meet NULL, the value that quietly breaks beginners' queries.
40 min 1 quiz Graded labs: 3 - 2.Data Modeling & Normalization
Turn a real-world problem into entities, relationships and keys, then remove redundancy with the normal forms (1NF to 3NF). You learn to spot update, insert and delete anomalies and to decide when denormalizing on purpose is justified.
45 min 1 quiz Graded labs: 3 - 3.Joins, Aggregation & Subqueries
Combine tables with INNER and LEFT JOINs, summarize with GROUP BY, HAVING and aggregate functions, and nest queries with subqueries and CTEs. Includes the classic traps: COUNT(*) versus COUNT(column), and NOT IN with NULLs.
45 min 1 quiz Graded labs: 3 - 4.Indexes & Query Performance
How B-tree indexes turn full-table scans into fast lookups, why composite index column order matters, and how to read a query plan with EXPLAIN. You also learn the cost of indexes on writes and why some queries cannot use them.
45 min 1 quiz Graded labs: 3 - 5.Transactions, ACID & Concurrency
Group several statements into one all-or-nothing unit with BEGIN, COMMIT and ROLLBACK, and understand atomicity, consistency, isolation and durability. Covers isolation levels, the anomalies they prevent, locking, deadlocks and optimistic concurrency control.
45 min 1 quiz Graded labs: 3
Beyond one server
NoSQL models, backups, replication and failover, and database security.
- 6.NoSQL: Document, Key-Value, Graph
The main non-relational families (document, key-value, wide-column and graph stores), what each is good at, and the trade-offs against SQL. Learn embedding versus referencing in documents and why access patterns drive NoSQL schema design.
45 min 1 quiz Graded labs: 3 - 7.Backup, Replication & High Availability
Logical and physical backups, point-in-time recovery, and why a backup you have never restored is only a hope. Then replication (primary and replicas), failover, replication lag, and the RPO and RTO targets that guide the design.
45 min 1 quiz Graded labs: 3 - 8.Database Security
Prevent SQL injection with parameterized queries, apply least-privilege roles, protect credentials, encrypt data in transit and at rest, and keep audit trails. Security here is mostly about limiting what a compromised application account can do.
45 min 1 quiz Graded labs: 3
Run a real example
This is the kind of code you will write. Run it, then change it and run it again.
PythonThree orders of magnitude difference from one idea: keep data sorted so you can skip most of it. Change the target to the last row and compare again.
Recommended challenges
Put the skills to work against a puzzle with a flag or a test suite.
Badges
Earned automatically from your progress on this device.
First Table
LockedFinish your first lesson.
0 / 1
SQL Fluent
LockedComplete every Modeling and SQL lesson.
0 / 5
Query Crafter
LockedPass 3 graded lab exercises.
0 / 3
Index Whisperer
LockedScore 80% or more on the first try in 4 lesson quizzes.
0 / 4
Database Architect
LockedComplete every lesson in the track.
0 / 8
Certificate of completion
Lessons completed: 0 / 8
Complete every lesson to unlock your certificate.