Skip to content

Databases ​

Part of the Interview Prep Roadmap. Coverage ratings are explained there.

SQL Querying ​

SELECT, WHERE, and filtering basics, then JOINs, aggregates, subqueries, and window functions.

Coverage: rich

Resources · SQLBolt — interactive lessons from SELECT upward · SQL — LeetCode — the Top SQL 50 study plan

Query Basics ​

  • SELECT, FROM, and WHERE
  • Comparison and logical operators
  • ORDER BY and LIMIT
  • DISTINCT
  • Pattern matching with LIKE and wildcards
  • NULL handling

Practice

Aggregation ​

  • COUNT, SUM, AVG, MIN, MAX
  • GROUP BY
  • HAVING vs. WHERE
  • Aggregate behavior with NULLs

Practice

Joins ​

  • INNER JOIN
  • LEFT, RIGHT, and FULL OUTER JOIN
  • Cross joins and self joins
  • Join conditions and cardinality

Practice

Subqueries & Set Operations ​

  • Scalar and correlated subqueries
  • IN, EXISTS, ANY, ALL
  • UNION, INTERSECT, EXCEPT
  • Common table expressions

Practice

Advanced Querying ​

  • Window functions (ROW_NUMBER, RANK, LAG, LEAD)
  • Logical order of query execution
  • Query optimization basics

Practice

Data Modification ​

  • INSERT, UPDATE, DELETE
  • Transactions and rollback

Practice

Database Design & Theory ​

Keys and schema design, then normalization, indexing, ACID properties, views, and choosing a database model for the shape of the data.

Coverage: rich

Resources · Database Design — freeCodeCamp · Use The Index, Luke — how indexes actually work · Notes: Database resources

Relational Model Fundamentals ​

  • Tables, rows, and columns
  • Primary, foreign, candidate, and composite keys
  • Relationship cardinality: one-to-one, one-to-many, many-to-many
  • Entity-relationship diagrams

Practice

Normalization ​

  • Functional dependencies
  • 1NF, 2NF, 3NF, BCNF
  • Insertion, update, and deletion anomalies
  • Denormalization and its justification

Practice

Indexing ​

  • Clustered vs. non-clustered indexes
  • B-tree and hash indexes
  • Composite indexes
  • Read and write trade-offs

Practice

Transactions & Concurrency ​

  • ACID properties
  • Isolation levels
  • Locking and deadlocks
  • Dirty reads, non-repeatable reads, and phantom reads

Practice

Database Objects ​

  • Views and materialized views
  • Stored procedures and triggers
  • Constraints

Practice

Database Selection ​

  • Relational, document, key-value, and graph models
  • SQL vs. NoSQL trade-offs
  • Matching a model to the shape of the data

Practice