SQL-Engineering-Handbook

đź“– Books

Part of the Resources Library — SQL Engineering Handbook

Every book here cleared the bar in How Resources Were Selected: a real publisher or a verifiable engineering track record, a stated reason it beat the alternatives, and no overlap with something already on this page. Fields follow the Resource Card Template.

[!TIP] Don’t buy in category order. Read the Recommended Reading Order line at the top of each section — it tells you which book to start with and which one to save for later.

Thirteen shelves, one reading ladder


Table of Contents


Essential Beginner Books

Recommended reading order: Learning SQL first, cover to cover. Keep Head First SQL as a second pass if the first one felt dry — same ground, much more visual.

Learning SQL (3rd Edition)

Field Details
Author / Organization Alan Beaulieu
Category Essential Beginner Books
Difficulty Beginner
Best For A first, properly sequenced introduction to SQL that doesn’t assume prior programming experience
Why It Is Recommended Builds from schema design through joins, subqueries, and transactions in a deliberate order, using one running example database throughout — the same “one schema, build up gradually” approach this Handbook uses
Key Topics Covered SELECT statements, filtering, joins, subqueries, grouping, transactions, indexes, views
Estimated Time 3–4 weeks at a relaxed pace
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites None
Who Should Read It Complete beginners; anyone whose SQL knowledge is copy-pasted and shaky
Related SQL Handbook Modules 00_SAMPLE_DATABASE, 01_FUNDAMENTALS, 02_AGGREGATIONS, 03_JOINS

Head First SQL

Field Details
Author / Organization Lynn Beighley
Category Essential Beginner Books
Difficulty Beginner
Best For Readers who find dense technical prose hard to stay with
Why It Is Recommended The Head First series’ visual, puzzle-driven format covers the same beginner ground as a traditional text but is far easier to stay consistent with — useful if straight prose isn’t sticking
Key Topics Covered SQL syntax fundamentals, table design basics, joins, aggregate functions
Estimated Time 2–3 weeks
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites None
Who Should Read It Visual learners; anyone who bounced off a more traditional SQL textbook
Related SQL Handbook Modules 01_FUNDAMENTALS, 02_AGGREGATIONS

Intermediate Books

Recommended reading order: Practical SQL if you want a hands-on, project-based bridge from beginner material. SQL Antipatterns once you’re already comfortable writing queries and want to stop making the mistakes that work but shouldn’t.

Practical SQL (2nd Edition)

Field Details
Author / Organization Anthony DeBarros
Category Intermediate Books
Difficulty Beginner–Intermediate
Best For Learning SQL through real, messy public datasets instead of toy tables
Why It Is Recommended Uses PostgreSQL and genuine public datasets (census data, election results) end to end, which matches this Handbook’s own philosophy of business-question-first practice over syntax drills
Key Topics Covered Data cleaning, joins, aggregate functions, working with dates and text, basic statistics in SQL, PostGIS intro
Estimated Time 4–5 weeks
Official Website No Starch Press catalog
Free or Paid Paid
Prerequisites 01_FUNDAMENTALS
Who Should Read It Beginners moving into applied, dataset-driven practice
Related SQL Handbook Modules 02_AGGREGATIONS, 03_JOINS, 09_DATE_FUNCTIONS, 11_NULL_HANDLING_AND_DATA_CLEANING

SQL Antipatterns

Field Details
Author / Organization Bill Karwin
Category Intermediate Books
Difficulty Intermediate
Best For Learning what not to do — schema and query mistakes that work in testing and fail in production
Why It Is Recommended Organized around real recurring mistakes (naive trees, EAV tables, ambiguous NULLs) rather than features, which makes it a rare “here’s why the obvious approach breaks” book
Key Topics Covered Schema antipatterns, query antipatterns, application-development antipatterns involving SQL
Estimated Time 3 weeks
Official Website Pragmatic Bookshelf catalog
Free or Paid Paid
Prerequisites 03_JOINS, 05_SUBQUERIES
Who Should Read It Anyone about to design their own schema for the first time
Related SQL Handbook Modules 05_SUBQUERIES, 11_NULL_HANDLING_AND_DATA_CLEANING, 18_SQL_BUSINESS_CASE_STUDIES

Advanced SQL

Recommended reading order: SQL Cookbook for pattern recognition (recognizing “oh, this is a gaps-and-islands problem”), then Joe Celko’s SQL for Smarties for the theory underneath those patterns.

SQL Cookbook (2nd Edition)

Field Details
Author / Organization Anthony Molinaro and Jonathan Gennick
Category Advanced SQL
Difficulty Intermediate–Advanced
Best For Building a mental library of query patterns (running totals, gaps and islands, pivoting) you’ll recognize instantly later
Why It Is Recommended Problem → multiple dialect-specific solutions → discussion of trade-offs, which mirrors how you actually solve unfamiliar queries on the job
Key Topics Covered Window functions, pivoting/unpivoting, hierarchical queries, string manipulation, date arithmetic across dialects
Estimated Time 5–6 weeks, used as a reference more than read cover to cover
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites 06_CTEs, 07_WINDOW_FUNCTIONS
Who Should Read It Intermediate developers who can already write joins and subqueries confidently
Related SQL Handbook Modules 07_WINDOW_FUNCTIONS, 08_WINDOW_BUSINESS_CASES, 13_SET_OPERATORS

Joe Celko’s SQL for Smarties (5th Edition)

Field Details
Author / Organization Joe Celko
Category Advanced SQL
Difficulty Advanced
Best For Understanding SQL as a declarative, set-based language instead of writing it like procedural code with SQL syntax
Why It Is Recommended The book most responsible for the “think in sets, not loops” mindset shift that separates intermediate from advanced SQL writers; still the standard advanced reference two decades on
Key Topics Covered Set-based thinking, advanced JOIN logic, temporal data, hierarchical and graph data in SQL, NULL handling theory
Estimated Time 6–8 weeks, reference-style
Official Website Morgan Kaufmann / Elsevier catalog
Free or Paid Paid
Prerequisites 06_CTEs, 07_WINDOW_FUNCTIONS, 12_ADVANCED_AGGREGATIONS
Who Should Read It Developers who write correct SQL but suspect they’re still thinking in loops
Related SQL Handbook Modules 12_ADVANCED_AGGREGATIONS, 13_SET_OPERATORS

Database Internals

Recommended reading order: Designing Data-Intensive Applications first for the broad map of the territory, then Database Internals to go deep on the storage-engine details DDIA only surveys.

Designing Data-Intensive Applications

Field Details
Author / Organization Martin Kleppmann
Category Database Internals
Difficulty Advanced
Best For Understanding the trade-offs behind every “should we use SQL or NoSQL / one big database or many” decision
Why It Is Recommended The reference point nearly every other book in this section gets compared against — broad, rigorous coverage of storage, replication, partitioning, and consistency, grounded in real systems rather than abstract theory
Key Topics Covered Storage engines, replication, partitioning, transactions, consistency and consensus, batch and stream processing
Estimated Time 8–10 weeks
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites Advanced Roadmap modules complete
Who Should Read It Backend, data, and analytics engineers who want the systems-level picture behind the SQL they write daily
Related SQL Handbook Modules 14_VIEWS, 15_INDEXES, 16_QUERY_OPTIMIZATION

Database Internals

Field Details
Author / Organization Alex Petrov
Category Database Internals
Difficulty Advanced
Best For Going one level deeper than DDIA into how storage engines and distributed consensus are actually implemented
Why It Is Recommended Where Designing Data-Intensive Applications surveys the landscape, this book dissects specific storage engine implementations (B-Trees, LSM-Trees) and distributed algorithms in detail — the natural next step, not a duplicate
Key Topics Covered B-Tree and LSM-Tree storage engines, page structures, buffer management, recovery, distributed consensus algorithms
Estimated Time 8 weeks
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites Designing Data-Intensive Applications, or equivalent systems background
Who Should Read It Engineers building or evaluating database/storage systems, not just querying them
Related SQL Handbook Modules 15_INDEXES, 16_QUERY_OPTIMIZATION

Query Optimization

Recommended reading order: SQL Performance Explained is the whole point of this category — read it before anything else here, including the Advanced SQL section above.

SQL Performance Explained

Field Details
Author / Organization Markus Winand
Category Query Optimization
Difficulty Intermediate–Advanced
Best For Understanding indexing well enough to predict, not guess, whether a query will be fast
Why It Is Recommended Explains indexing from the data-structure level up (what a B-Tree index actually does to a query plan) rather than listing rules of thumb, and stays dialect-aware throughout
Key Topics Covered Index fundamentals, the WHERE clause and index use, sorting and indexes, joins and execution plans, partial and functional indexes
Estimated Time 3–4 weeks
Official Website Author’s own site, use-the-index-luke.com — the core content is free to read online; the print/PDF edition is paid
Free or Paid Free (web) / Paid (print, PDF)
Prerequisites 15_INDEXES
Who Should Read It Anyone who has ever run EXPLAIN and not been sure what they were looking at
Related SQL Handbook Modules 15_INDEXES, 16_QUERY_OPTIMIZATION

High Performance MySQL (4th Edition)

Field Details
Author / Organization Silvia Botros and Jeremy Tinley
Category Query Optimization
Difficulty Advanced
Best For Going deep on one specific engine (MySQL/InnoDB) once the general indexing theory is solid
Why It Is Recommended The dialect-specific complement to SQL Performance Explained — where that book teaches the general theory, this one applies it to InnoDB’s actual internals, replication, and operational tuning
Key Topics Covered InnoDB internals, indexing strategy, replication, query optimization, schema design for performance
Estimated Time 5–6 weeks, reference-style
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites SQL Performance Explained
Who Should Read It Engineers operating MySQL/InnoDB in production, not just querying it
Related SQL Handbook Modules 16_QUERY_OPTIMIZATION

Data Warehousing

Recommended reading order: The Data Warehouse Toolkit is the foundational text — read it before Star Schema, which assumes the vocabulary Kimball defines.

The Data Warehouse Toolkit (3rd Edition)

Field Details
Author / Organization Ralph Kimball and Margy Ross
Category Data Warehousing
Difficulty Intermediate–Advanced
Best For Learning dimensional modeling — facts, dimensions, star schemas — from the people who defined the vocabulary the industry still uses
Why It Is Recommended The founding text of dimensional modeling; every “fact table,” “slowly changing dimension,” and “star schema” you’ll hear on a data team traces back to this book
Key Topics Covered Dimensional modeling, star schemas, slowly changing dimensions, fact table grain, industry-specific case studies
Estimated Time 6–8 weeks
Official Website Wiley catalog
Free or Paid Paid
Prerequisites 06_CTEs, 18_SQL_BUSINESS_CASE_STUDIES
Who Should Read It Anyone designing a warehouse schema, analytics engineers especially
Related SQL Handbook Modules 18_SQL_BUSINESS_CASE_STUDIES, projects/nagpurlens

Star Schema: The Complete Reference

Field Details
Author / Organization Christopher Adamson
Category Data Warehousing
Difficulty Advanced
Best For A denser, more implementation-focused companion once Kimball’s concepts are familiar
Why It Is Recommended Goes further into edge cases — bridge tables, multi-valued dimensions, late-arriving data — that Kimball’s book introduces but doesn’t fully resolve
Key Topics Covered Star schema design patterns, aggregate tables, bridge tables, ETL implications of schema choices
Estimated Time 4–5 weeks
Official Website McGraw-Hill catalog
Free or Paid Paid
Prerequisites The Data Warehouse Toolkit
Who Should Read It Analytics/data engineers implementing a warehouse, not just designing one on a whiteboard
Related SQL Handbook Modules 18_SQL_BUSINESS_CASE_STUDIES

Analytics Engineering

Note: analytics engineering as a named discipline is young enough that its best material lives in official docs and blogs, not books — see documentation.md → dbt Documentation and blogs.md → dbt Blog for the primary sources. One book earns a place here for the broader data-platform context.

Fundamentals of Data Engineering

Field Details
Author / Organization Joe Reis and Matt Housley
Category Analytics Engineering
Difficulty Intermediate
Best For Understanding where analytics engineering (dbt-style modeling) sits inside the larger data platform, before or after the pipeline
Why It Is Recommended Covers the full data lifecycle — ingestion, storage, transformation, serving — so a SQL-focused analytics engineer can see what’s upstream and downstream of their own models
Key Topics Covered Data lifecycle, storage and ingestion patterns, transformation and modeling, orchestration, data platform architecture
Estimated Time 5 weeks
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites Intermediate Roadmap complete
Who Should Read It Analytics engineers who want the platform context around their SQL models
Related SQL Handbook Modules projects/nagpurlens, projects/olist

Database Design

Recommended reading order: Database Design for Mere Mortals end to end before you design your first real schema — it’s written specifically for that purpose.

Database Design for Mere Mortals (3rd Edition)

Field Details
Author / Organization Michael J. Hernandez
Category Database Design
Difficulty Beginner–Intermediate
Best For Designing a normalized schema from a business requirements conversation, step by step
Why It Is Recommended Walks through the actual design process — interviewing stakeholders, identifying entities, normalizing — rather than just defining normal forms in the abstract
Key Topics Covered Entity identification, normalization (1NF–5NF explained practically), primary/foreign keys, relationship types
Estimated Time 4 weeks
Official Website Addison-Wesley / Pearson catalog
Free or Paid Paid
Prerequisites 03_JOINS
Who Should Read It Anyone designing a schema from scratch for the first time, including for datasets/employee_management-style projects
Related SQL Handbook Modules 03_JOINS, 14_VIEWS, 15_INDEXES

Data Modeling

Recommended reading order: read after Database Design for Mere Mortals — this book assumes normalization is already second nature and moves into modeling for analytics rather than transactional use.

Data Modeling Made Simple (2nd Edition)

Field Details
Author / Organization Steve Hoberman
Category Data Modeling
Difficulty Intermediate
Best For Bridging conceptual, logical, and physical data models — and knowing which one you’re actually looking at in a meeting
Why It Is Recommended Most SQL books jump straight to physical schemas; this one is specifically about the conceptual/logical modeling work that happens before a CREATE TABLE statement
Key Topics Covered Conceptual vs. logical vs. physical models, entity-relationship diagramming, subtype/supertype modeling
Estimated Time 3–4 weeks
Official Website Technics Publications catalog
Free or Paid Paid
Prerequisites Database Design for Mere Mortals
Who Should Read It Analytics engineers and data modelers moving beyond single-table thinking
Related SQL Handbook Modules 18_SQL_BUSINESS_CASE_STUDIES

Performance Tuning

Recommended reading order: Use The Index, Luke! first — it’s free and it’s the fastest path to the “why” behind tuning decisions. Treat it as the practical companion to SQL Performance Explained above (same author, web-first format).

Use The Index, Luke!

Field Details
Author / Organization Markus Winand
Category Performance Tuning
Difficulty Intermediate
Best For A free, browsable reference for indexing and query tuning questions as they come up, rather than a book read start to finish
Why It Is Recommended The free web companion to SQL Performance Explained, organized for lookup rather than linear reading — genuinely useful as a bookmark, not just an introduction
Key Topics Covered Index fundamentals, WHERE clause indexing, sorting, partial indexes, pagination performance
Estimated Time Ongoing reference; 3–4 hours for a full first pass
Official Website use-the-index-luke.com
Free or Paid Free
Prerequisites 15_INDEXES
Who Should Read It Anyone who wants a bookmarked answer the next time a query is unexpectedly slow
Related SQL Handbook Modules 15_INDEXES, 16_QUERY_OPTIMIZATION

Reference Books

Recommended reading order: not meant to be read start to finish — keep on the shelf (or the second monitor) and look things up as needed.

SQL Pocket Guide (4th Edition)

Field Details
Author / Organization Jonathan Gennick
Category Reference Books
Difficulty All levels
Best For A fast syntax lookup across dialects when you can’t remember whether a function is called differently in PostgreSQL vs. SQL Server
Why It Is Recommended Compact, dialect-comparative reference rather than a teaching text — exactly what a “which database calls it what” question needs
Key Topics Covered Cross-dialect syntax comparison (PostgreSQL, MySQL, Oracle, SQL Server, SQLite), data types, functions
Estimated Time Reference only, not sequential
Official Website O’Reilly Media catalog
Free or Paid Paid
Prerequisites None
Who Should Read It Anyone regularly switching between two or more SQL dialects
Related SQL Handbook Modules Applies across all modules

Classic Books

Recommended reading order: Codd’s original paper first — it’s short, foundational, and everything else in this library is downstream of it. Date’s book afterward, as the full-length treatment.

“A Relational Model of Data for Large Shared Data Banks”

Field Details
Author / Organization E. F. Codd — originally published in Communications of the ACM, 1970
Category Classic Books
Difficulty Advanced (short, but dense)
Best For Reading the actual origin of the relational model, in the author’s own words
Why It Is Recommended Every table, key, and normal form taught in this Handbook descends directly from this paper — it’s the single most foundational document in the field
Key Topics Covered The relational model, normalization’s theoretical basis, why relations (not hierarchies or networks) won
Estimated Time 1–2 hours
Official Website ACM Digital Library
Free or Paid Free (widely mirrored by universities; ACM Digital Library may require access)
Prerequisites None, though it lands better after 03_JOINS
Who Should Read It Anyone who wants to know why SQL is shaped the way it is, not just how to use it
Related SQL Handbook Modules 01_FUNDAMENTALS, 03_JOINS

An Introduction to Database Systems (8th Edition)

Field Details
Author / Organization C. J. Date
Category Classic Books
Difficulty Advanced
Best For The full academic grounding in relational theory, for readers who want rigor over speed
Why It Is Recommended The standard university textbook on relational theory for decades — dense, but nothing since has replaced it as the rigorous, first-principles treatment
Key Topics Covered Relational algebra and calculus, normalization theory, integrity constraints, transaction theory
Estimated Time 10+ weeks, textbook-paced
Official Website Pearson catalog
Free or Paid Paid
Prerequisites Intermediate Roadmap complete
Who Should Read It Readers who want the theoretical foundation, not primarily practitioners in a hurry
Related SQL Handbook Modules 01_FUNDAMENTALS through 13_SET_OPERATORS

Interview Preparation

Note: the deepest interview preparation material is structured, not a single book — see interview-resources.md for the full staged roadmap and platform list. One book is listed here for offline, structured drilling.

SQL Practice Problems

Field Details
Author / Organization Sylvia Moestl Vasilik
Category Interview Preparation
Difficulty Beginner–Intermediate
Best For Self-contained, graded practice problems with worked solutions, usable offline
Why It Is Recommended Problems are staged by difficulty with full setup scripts and solutions, closer to interview-style drilling than most textbooks attempt
Key Topics Covered Filtering, joins, aggregation, and subquery problems staged in three difficulty tiers
Estimated Time 2–3 weeks of daily drilling
Official Website Self-published; available via major book retailers
Free or Paid Paid
Prerequisites Intermediate Roadmap complete
Who Should Read It Interview candidates who want offline, no-distraction drilling before moving to timed platforms
Related SQL Handbook Modules 17_SQL_INTERVIEW_QUESTIONS, exercises/interview

Next in the library: blogs.md. Back to Resources Library.