Goodreads helps you keep track of books you want to read.
Start by marking “SQL Antipatterns: Avoiding the Pitfalls of Database Programming (Pragmatic Programmers)” as Want to Read:
SQL Antipatterns: Avoiding the Pitfalls of Database Programming (Pragmatic Programmers)
by
Bill Karwin
Each chapter in this book helps you identify, explain, and correct a unique and dangerous antipattern. The four parts of the book group the antipatterns 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 Entr
...more
Kindle Edition, 328 pages
Published
June 25th 2010
by Pragmatic Bookshelf
Friend Reviews
To see what your friends thought of this book,
please sign up.
Reader Q&A
To ask other readers questions about
SQL Antipatterns,
please sign up.
Be the first to ask a question about SQL Antipatterns
This book is not yet featured on Listopia.
Add this book to your favorite list »
Community Reviews
(showing 1-30 of 566)

The book that every modern developer should read. As we all know, databases are an essential part of software development. With the rise of NoSQL databases, the relational ones start to get less attention than they deserve, but that all comes right whenever you read about the next big project/company deciding to store their relational data in a non-relational NoSQL solution *cough* *cough* *cough* MongoDB followers *cough* *cough*.
And here we are. You stopped to read this review and possibly rea ...more
And here we are. You stopped to read this review and possibly rea ...more

Apr 02, 2010
Jason
rated it
really liked it
·
review of another edition
Recommends it for:
Novice-to-Intermediate Developers
First, this is based on B6.0 printing, version 2010-4-1.
I was hoping to get a little more out of this book. I bought it because I saw the excerpt from the chapter "Naive Trees" and the statement "most developers aren’t SQL experts, and most of the SQL that gets used is inefficient, hard to maintain, and sometimes just plain wrong," on PragProg Bookshelf. Not wanting to create poor SQL, I knew I needed this book.
I struggled for a long time with a database that had a large tree structure, so I'm a ...more
I was hoping to get a little more out of this book. I bought it because I saw the excerpt from the chapter "Naive Trees" and the statement "most developers aren’t SQL experts, and most of the SQL that gets used is inefficient, hard to maintain, and sometimes just plain wrong," on PragProg Bookshelf. Not wanting to create poor SQL, I knew I needed this book.
I struggled for a long time with a database that had a large tree structure, so I'm a ...more

I'm a software developer who gets paid mostly for working on the back end portion of solutions and I've worked in both small and large companies. I am not an SQL guru and I am more than happy to let somebody else review and fine tune any SQL that the solution uses. If I'm lucky, I'll be working in an organization large enough to have full-time SQL experts who can help me out. More times than not, however, the development team has to craft the SQL ourselves. As of late, I've been letting Hibernat
...more

In the world of SQL you can do many mistakes. This will not only result in slow queries but in hours wasted to figure out what you try to achieve. Bill Karwin collected the most uses anti-patterns and explains how you can do a better job. His solutions are not only shorter to write and faster to execute, but they are simpler to maintain as well.
The catalogue of anti-patterns follows a bit the one from Refactoring: Improving the Design of Existing CodeRefactoring in which every (anti-) pattern i ...more
The catalogue of anti-patterns follows a bit the one from Refactoring: Improving the Design of Existing CodeRefactoring in which every (anti-) pattern i ...more

This is a very readable book covering best practice in relational database design and some related areas of interest to software developers. The book provides examples of bad practice (anti-patterns), explains the impact of bad decisions and provides alternative solutions to the situations discussed.
There is an appendix covering the principles of relational databases, which is useful as a reminder. For the reader with no experience in database design another book should be read first to gain a t ...more
There is an appendix covering the principles of relational databases, which is useful as a reminder. For the reader with no experience in database design another book should be read first to gain a t ...more

This books describes common errors developers make when dealing with databases. It's a good book even though I haven't learn that much from it.
Sadly I have made many of the errors described in the book. And I have fixed quite a few in code from other. So I knew most of the anti patterns and their solution.
It's still a good read. It puts names on errors that lots of developers do. It gives solutions to those errors. Even better, it explains in dept why they are errors and the problems you might ...more
Sadly I have made many of the errors described in the book. And I have fixed quite a few in code from other. So I knew most of the anti patterns and their solution.
It's still a good read. It puts names on errors that lots of developers do. It gives solutions to those errors. Even better, it explains in dept why they are errors and the problems you might ...more

Sep 01, 2016
Ispiriants Volodymyr
rated it
it was amazing
·
review of another edition
Shelves:
database
It's a very good book for the people, who just learned SQL. I regret that I did not read it before, because it will resolve some of issues during my work.

A sound coverage of typical SQL schema mistakes, with a useful exposition of the choices available in implementing inheritance. Less useful to a practitioner than I was hoping because he shies away from taxing the reader too much - thus normal forms are vaguely explained and no precise meaning is ascribed to them. Dinged also for nothing on de normalization and what you need to be careful about when doing tbis, after all de normalization can look like an anti pattern.

This is a catalog of what the author considers widespread bad practices in the use of relational databases and SQL programming.
Most antipatterns are about misunderstandings on good database design; for example, the author discusses such timeless classics as implementing many-to-many relationships by putting multiple comma-separated values in a row. For instance, the database backing a blog whose posts can have an arbitrary number of tags would have a column TAGS with entries such as 'tag1, tag2, ...more
Most antipatterns are about misunderstandings on good database design; for example, the author discusses such timeless classics as implementing many-to-many relationships by putting multiple comma-separated values in a row. For instance, the database backing a blog whose posts can have an arbitrary number of tags would have a column TAGS with entries such as 'tag1, tag2, ...more

Very well written - concise and to the point text interspersed with both SQL and general software development bits of wisdom, followed by simple but not simplistic examples. Although I've rarely seen any of the antipatterns in practice, the greatest benefit from reading this book has been in the solution sections which always listed several approaches to thwarting the antipattern and thus never failed to gave me a new perspective on doing things.

A great book, that is easy to read, and includes many important topics. I would say it is an intermediate book about databases, so if you are a database expert there won't be much to learn from it. I didn't like the usage of php inside the book. Also in the sections "regognizing the antipattern" the given examples did sound a bit stupid. I still give it 5 stars, the ratio between what's learnt / time spent is really good.

Feb 24, 2011
Eric Wisdahl
rated it
really liked it
·
review of another edition
Shelves:
textbooks,
tech-books
SQL Antipatterns: Avoiding the Pitfalls of Database Programming reads a heck of a lot like it sounds it would. This book is full of good examples of bad practices (including some that SEEM like they would help you out) and ways that you can avoid them. As a few examples, multi-valued columns, multi-column attributes, too many indexes, replacing null values with a different known value, etc.
I'd say that this book is best read by a junior / mid-level DBA or developer as it will provide a lot of go ...more
I'd say that this book is best read by a junior / mid-level DBA or developer as it will provide a lot of go ...more

A very good book for younger developers, but I've learned most of these solutions already so I wanted a bit more out of this book. I picked it up because of its premise (common mistakes) and the chapter on trees, which while interesting (and useful to others I've recommended the book to) wasn't as insightful as I'd hoped. Having a strong background in this topic, I was able to skim through it easily in one afternoon. The book is well-written, and I will likely require it of my students if I ever
...more

The book is good and has a good explanation of some very common errors and stupidities (especially the chapter on trees was very interesting for me, as I haven't seen some of the solutions). The bad side is that the book is bit bloated, and the last part on application-related anti-patterns doesn't really fit in.

Perfect for SQL beginners but even for me couple of solutions and best practices were poorly known. Very refreshing for people who are strongly sticked to ORM's.

Dec 31, 2012
Christophe Addinquy
rated it
really liked it
·
review of another edition
Shelves:
craftmanship

Jul 22, 2013
Niels
rated it
really liked it
·
review of another edition
Shelves:
sql-server,
database
Great examples and very well written.
I am sure that I will get back to the examples during future discussions.
I am sure that I will get back to the examples during future discussions.
There are no discussion topics on this book yet.
Be the first to start one »