One of the things that I have been looking at over the last several months is the list of books which have been compiled into a reading list for the Microsoft Certified Master program (Robert Davis (@SQLSoldier) has compiled the list on Amazon). I don’t believe that I’ll be going for that particular certification any time soon; but I do think that it is a good idea to attempt to garner the knowledge that one would need to pass the exams. As such, I decided to pick up the SQL Antipatterns book with a gift card I got for Christmas.
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 with each chapter taking on the subject of one bad practice (including some that SEEM like they would help you out) and ways that you can avoid it. As a few examples, multi-valued columns, multi-column attributes, too many indexes, replacing null values with a different known value, etc.
This book is written to be database agnostic, attempting to explain some of the problems in the patterns present in all database platforms. Furthermore, the chapters will point out when one database application contains particular pitfalls or when others might be better at avoiding them. Ruby on Rails is used with Postgres in the examples present. For me, this was somewhat refreshing as it really drove home the point that these issues are not just related to (Microsoft) SQL Server.
I’d say that this book is best read by a junior / mid-level DBA or software developer as it will provide a lot of good information on things to avoid, and why it is that you want to avoid them. The chapters are very cohesive and are easy to consume in a single sitting. As a matter of fact, I sat down and read about 5 chapters at a time (As opposed to some books that would take me five sessions to read one chapter).
I read this book in February of 2011.