SQL Antipatterns
Avoiding the Pitfalls of Database Programming
Publisher: Pragmatic Bookshelf
Final Release Date: June 2010
Pages: 328

Bill Karwin has helped thousands of people write better SQL and build stronger relational databases. Now he's sharing his collection of antipatterns--the most common errors he's identified in those thousands of requests for help.

Most developers aren't SQL experts, and most of the SQL that gets used is inefficient, hard to maintain, and sometimes just plain wrong. This book shows you all the common mistakes, and then leads you through the best fixes. What's more, it shows you what's behind these fixes, so you'll learn a lot about relational databases along the way.

Each chapter in this book helps you identify, explain, and correct a unique and dangerous antipattern. The four parts of the book group the anti​patterns in terms of logical database design, physical database design, queries, and application development.

The chances are good that your application's database layer already contains problems such as Index Shotgun, Keyless Entry, Fear of the Unknown, and Spaghetti Query. This book will help you and your team find them. Even better, it will also show you how to fix them, and how to avoid these and other problems in the future.

SQL Antipatterns gives you a rare glimpse into an SQL expert's playbook. Now you can stamp out these common database errors once and for all.

Whatever platform or programming language you use, whether you're a junior programmer or a Ph.D., SQL Antipatterns will show you how to design and build databases, how to write better database queries, and how to integrate SQL programming with your application like an expert. You'll also learn the best and most current technology for full-text search, how to design code that is resistant to SQL injection attacks, and other techniques for success.

Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillySQL Antipatterns

(based on 1 review)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 1 customer

Displaying review 1

Back to top

(1 of 1 customers found this review helpful)


This book is pure gold!

By Marc Fearby

from Tamworth, NSW, Australia

About Me Developer

Verified Reviewer


  • Accurate
  • Easy to understand
  • Helpful examples
  • Well-written


    Best Uses

    • Intermediate
    • Novice

    Comments about oreilly SQL Antipatterns:

    I bought the ebook of this from the pragprog website after reading the first 5 chapters of "SQL and Relational Theory, 2nd Edition" by C J Date, and realising that it wasn't going to teach me a thing.

    This particular book is pure gold for developers who are not in the company of the DBA gods. It has real-world "antipatterns", and explains in detail why they're bad, and how to design your database in a better way to accomodate the particular requirements.

    I was considering Entity-Attribute-Value for a new and complex database but after reading this book, I now know that it will cause more problems than it solves.

    This is the only book that developers who use SQL need to buy. Forget all the high falutin' theory books, they're a waste of time. Far better to learn from other people's mistakes, and read the nitty gritty on why those mistakes are so bad.

    Displaying review 1

    Back to top

    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Print:  $34.95