Learning path · 29 lessons · 5 topics
🗃️ SQL & Databases interview preparation
SQL, PostgreSQL, MySQL, Oracle and Google Cloud SQL, from joins to replication.
Every backend interview includes data: writing correct SQL, explaining indexes and transactions, and reasoning about how the database behaves under load. Senior roles add replication, failover, partitioning and zero-downtime migrations.
Start with SQL fundamentals (joins, grouping, window functions, indexes, isolation levels), then study the database your target company uses: PostgreSQL, MySQL or Oracle, and Cloud SQL if they run on Google Cloud.
What you will learn
- Joins, aggregation, window functions and query tuning
- Indexes, transactions, isolation levels and locking
- PostgreSQL MVCC, MySQL InnoDB and Oracle architecture
- Replication, high availability, migrations and Cloud SQL
Topics
Roadmap: beginner to advanced
-
1
Beginner Beginner stage
Foundations: the concepts every interviewer expects you to explain clearly.
SQL Fundamentals
- What are the different SQL joins? Explain with an example.
- WHERE vs HAVING, and in what order does SQL evaluate a query?
PostgreSQL
MySQL
Oracle
Cloud SQL
-
2
Intermediate Intermediate stage
Working knowledge: how things behave in real projects and the trade-offs you make.
SQL Fundamentals
- What are window functions? Solve "top N per group" and running totals.
- How do indexes work? When does a database not use an index?
- Explain ACID, transaction isolation levels and the anomalies they prevent.
- Normalisation vs denormalisation: explain 1NF, 2NF, 3NF and when to break the rules.
- How do you find and fix a slow query? Explain EXPLAIN plans.
PostgreSQL
- How does MVCC work in PostgreSQL, and why do VACUUM and autovacuum matter?
- Which PostgreSQL index types exist and when do you use each?
- Explain CTEs, recursive queries and LATERAL joins in PostgreSQL.
MySQL
- Why does the choice of primary key matter so much in InnoDB?
- Explain InnoDB locking: record, gap and next-key locks, and common deadlocks.
Oracle
- How does Oracle provide read consistency? Explain undo, SCN and ORA-01555.
- What are bind variables, hard vs soft parsing, and why do they matter for Java applications?
- Explain PL/SQL: procedures, functions, packages, and bulk processing.
Cloud SQL
-
3
Advanced Advanced stage
Senior depth: internals, scale, failure modes and design decisions.
SQL Fundamentals
PostgreSQL
- How do replication, high availability and connection pooling work for PostgreSQL in production?
- How do you run schema migrations on a large PostgreSQL table without downtime?
MySQL
- How does MySQL replication work, and what are the HA options?
- How do you change the schema of a huge MySQL table online?
Oracle
Cloud SQL