Where Clever SQL Becomes Dangerous
Every database developer has written a query that seemed reasonable at the time but later turned into a maintenance headache. Bill Karwin’s SQL Antipatterns collects those familiar traps, explains why they appear attractive, and then replaces each one with a more robust way to model, query, and manage data.
Logical, Physical, and Query-Level Antipatterns
The book is organized around three broad areas where SQL projects get into trouble. The logical design chapters cover issues like comma-separated lists, naive tree structures, polymorphic associations, and generic attribute tables. Physical design focuses on precision, constraints, and index strategy, including chapters on rounding errors, phantom files, and the “index shotgun.” Query antipatterns address NULL handling, ambiguous groups, random selection, full-text search, spaghetti queries, and shortcuts such as implicit columns.
Each Chapter Follows a Useful Pattern
- Objective: the goal a developer may be trying to achieve
- Antipattern: the common approach that causes problems
- Recognition: clues that the antipattern has appeared in a project
- Legitimate uses: limited cases where the approach may be acceptable
- Solution: cleaner, more reliable alternatives that fit real database work
This structure turns the book into both a readable guide and a reference for later use.
For Developers Ready to Move Past SQL Basics
Readers with a working knowledge of SQL will get the most from these chapters. The examples are grounded in relational database behavior, and the solutions emphasize constraints, normalization, clear semantics, and performance awareness rather than platform-specific tricks.
Practical Lessons Without Platform Lock-In
The discussion stays close to principles that matter across relational database systems. Rather than promoting a single product, Karwin helps readers recognize design trade-offs and choose safer paths for their own applications.
User Reviews
Only logged in customers who have purchased this product may leave a review.
Original price was: $5.00.$2.50Current price is: $2.50.

There are no reviews yet.