Book Review - SQL Hacks by Andrew Cumming and Gordon Russell

Part of: The RAM Review

SQL Hacks works well because of the fact that it does what it says. It hacks. It gets in to SQL and shows you how to do things that you would have to, in many cases, search for hours to find out how to accomplish. This is not for the beginner, rather these books target more experienced users.

It is a collection of 100 hacks that, according to the authors, will help you to “get the job done”. They are not concerned with good database design or sticking to the rules. Their goal is to give you a better understanding of the breath of SQL and how different approaches to a solution can result in simple and elegant solutions.

This is titled SQL Hacks, because the authors have worked to make this volume and vendor/platform independent as possible. When there are differences, they take the time to reference back to SQL Server, Oracle, MySQL, PostgreSQL and MS-Access when applicable.

While it would be time-consuming to list more than a few hacks, to give you an idea of the scope of the book, I will illustrate a few. There are some simple ones such as number 15 "Search for Keywords Without LIKE". Using the keyword LIKE will give you matches where an exact match is found. But what if you wanted to search for partial matches with a resulted weighting for the matches? Hack number 15 gives it to you. Since each of the major SQL systems do it differently, the authors show you how to do it with each of them.

A more complex Hack is number 41; "Copy Web Pages into a Table". Here the authors spend almost seven pages showing you how to use XSLT processing to take a web page and extract the data you require and insert it into a SQL Database.

The book is broken in to 12 chapters as listed below.

Chapter 1, SQL Fundamentals (6 hacks)
Chapter 2, Joins, Unions, and Views (8 hacks)
Chapter 3, Text Handling (4 hacks)
Chapter 4, Date Handling (5 hacks)
Chapter 5, Number Crunching (17 hacks)
Chapter 6, Online Applications (8 hacks)
Chapter 7, Organizing Data (9 hacks)
Chapter 8, Storing Small Amounts of Data (6 hacks)
Chapter 9, Locking and Performance (13 hacks)
Chapter 10, Reporting (13 hacks)
Chapter 11, Users and Administration (7 hacks)
Chapter 12, Wider Access (4 hacks)

To me, SQL Hacks is the classic reference book that you need to keep on the shelf, close at hand for those little jobs that come up and just need to get done. It also serves the purpose of giving you new ideas for solutions that perhaps, you may have thought could not be done.

Article tags

Spread the word
Bookmark and Share
Profile image for t-michael-testi

Article Author: T. Michael Testi

T. Michael Testi is software developer, a writer, and a photographer. He also blogs at PhotographyTodayNet and at All This and Everything Else.

Visit T. Michael Testi's author pageT. Michael Testi's Blog

Read comments on this article, and add some feedback of your own

Article comments

Add your comment, speak your mind

Personal attacks are NOT allowed.
Please read our comment policy.
Please preview your comment.

blogcritics lists for Nov 29, 2009

fresh articles Most recent articles site-wide

fresh comments Most recent comments site-wide

most comments Most comments in 24hrs

top writers Most prolific Blogcritics for October

top commenters Most prolific Commenters in 24 hrs