🗄️ AI & Data · skill roadmap · updated for 2026

SQL & Databases Roadmap

Every developer, analyst and data engineer works with databases, and SQL questions appear in almost every technical interview. This free SQL and databases roadmap goes from your first SELECT to joins, CTEs and window functions, then database design, indexing and transactions, and finally NoSQL, replication and scaling.

19steps in 4 stages
19free lessons · 95 min read
~90 hstudy & practice
6–10 weeksBeginner → Advanced
0%
Your progress
0 of 19 lessons
Saved in this browser — no account needed.
Next up · step 1 SQL Fundamentals → 🎉 Every lesson done — take a Skill Forge test below!
By the end you'll be able to:
  • ✔Write complex SQL with joins, CTEs and window functions
  • ✔Design normalised schemas and choose the right indexes
  • ✔Explain transactions, isolation levels and MVCC
  • ✔Know when to use MongoDB or Redis, and how databases scale

The roadmap

1
Stage 1 of 4 · 4 steps

SQL basics

  1. What SQL is, the relational model, and the users/orders/products schema used throughout this section.

    Start lesson →
  2. SELECT, WHERE, comparison and logical operators, LIKE, IN, BETWEEN, ORDER BY, and LIMIT.

    Start lesson →
  3. Joins 5 min

    INNER, LEFT, RIGHT, and FULL joins explained with examples, plus self-joins.

    Start lesson →
  4. COUNT, SUM, AVG, MIN, MAX, GROUP BY, and the difference between WHERE and HAVING.

    Start lesson →
Stage 1 project · add it to your portfolio

Sales questions

Load a sample sales dataset and answer ten business questions — top customers, monthly revenue, best products — in SQL.

2
Stage 2 of 4 · 4 steps

Advanced SQL

  1. Subqueries in WHERE and FROM, correlated subqueries, common table expressions, and recursive CTEs.

    Start lesson →
  2. ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD with PARTITION BY, running totals, and top-N-per-group.

    Start lesson →
  3. Reading a query plan conceptually, plus classic puzzles: gaps in a sequence, second-highest value, and hierarchical self-joins.

    Start lesson →
  4. B-tree vs GIN vs GiST indexes, reading EXPLAIN ANALYZE, and partial indexes.

    Start lesson →
Stage 2 project · add it to your portfolio

Analytics report

Rank, running-total and cohort-retention queries with window functions, then speed up the slowest with an index.

3
Stage 3 of 4 · 6 steps

Database design

  1. Why schema design matters and the process: identifying entities, relationships, and constraints.

    Start lesson →
  2. 1NF, 2NF, and 3NF explained with a before/after example, and when to deliberately denormalize.

    Start lesson →
  3. What to index, composite index column order, and the real costs of over-indexing.

    Start lesson →
  4. Atomicity, consistency, isolation, and durability, each explained with a concrete failure example.

    Start lesson →
  5. MVCC in PostgreSQL Optional 4 min

    PostgreSQL's MVCC model, isolation levels, and why VACUUM exists.

    Start lesson →
  6. A complete worked example: entity identification, normalization decisions, and the final schema for an e-commerce order system.

    Start lesson →
Stage 3 project · add it to your portfolio

Design a booking system

An ER diagram and normalised schema for a clinic booking system, with constraints, indexes and a transaction for booking.

4
Stage 4 of 4 · 5 steps

NoSQL & scale

  1. Embedding vs referencing, the core MongoDB modeling decision, and schema validation rules.

    Start lesson →
  2. Strings, hashes, lists, sets, and sorted sets with real commands, including a leaderboard example.

    Start lesson →
  3. Replication 6 min

    Primary-replica setup, binlog-based replication, GTIDs, replication lag, and read/write splitting.

    Start lesson →
  4. Indexing, read replicas, sharding strategies, and the trade-offs of each.

    Start lesson →
  5. Real SQL interview questions and answers covering joins, subqueries, NULL handling, and more.

    Start lesson →
Stage 4 project · add it to your portfolio

Polyglot persistence

Add a Redis cache and a MongoDB activity log next to your relational schema, and explain what each store is for.

🏁

Finish line: prove it

Finished the roadmap? Turn it into proof employers trust.

🏆 Earn a free Skill Forge certificate

🧭 Where to go next

SQL & Databases Roadmap FAQ

How long does it take to learn SQL?
You can write useful queries within a week. Getting comfortable with joins, CTEs and window functions — the level interviews expect — typically takes 6–10 weeks of practice.
Should I learn MySQL or PostgreSQL?
Standard SQL works on both, so the first stages apply to either. PostgreSQL has richer features and is increasingly popular; MySQL is everywhere in web hosting. Learn one well and the other takes days.
Do I need SQL if I use an ORM?
Yes. ORMs generate SQL for you, but slow pages, N+1 queries and missing indexes are only fixable if you can read and write SQL yourself.
When should I use NoSQL?
Use a relational database by default. Reach for MongoDB when your data is document-shaped and flexible, and Redis for caching, sessions, queues and counters.

Keep going after this roadmap

See all 14 roadmaps →