Joe Celko has looked deep into the code of novice SQL programmers and found a consistent and troubling pattern. These programmers have not changed their approach from writing code for a procedural language, like C, to a declarative language--which is what SQL is. As a result they are not fully using the power and capability inherent in SQL and that translates into writing more code than they need to write, more complex code than is needed, and ultimately lower productivity. Thinking in sets reveals the conceptual shift these programmers need to make. Through detailed examples and clear explanations, Joe enables readers to concepualize database problems as rooted in sets and solvable through declarative programming techniques. The book focuses on three main table-based SQL techniques that not only demonstrate this set characteristic of SQL but also dramatically simplify application development. For each table type--auxillary, temporal and virrual--Joe teaches not only the new kind of thinking required to use them effectively but also how to choose the right table technique to apply and why.
This book deserves a little more credit than Celko's SQL Style book.
The continuing bad: -Layout is poor- excessive gutters force lots of line breaks that really hamper readability of code examples -Explanation is often inadequate to explain -The title suggests exploration of a few set-related ideas. The first half of the book reads like a list of syllabus topics that need to be briefly mentioned, and only towards the end does it begin to feel like a dive into interesting concepts -Multiple good/bad examples are often not adequately labeled to indicate good/bad/betterness -I like Celko's pro-set-based stance, but in some cases his attempts to avoid procedural code lead to ridiculous seeming SQL with hard-coded repetition. He repeatedly says that the code can be generated semi-automatically, but I can't believe that these are reasonable best practices for general cases.
The better-than-the-last-Celko-book: -Everything gets *some* explanation (yeah, this is better than the last book) -The book often works through mutliple approaches with some discussion of pros and cons, though the explanation & justification is still often lacking -I feel like I came away with some new information, and some ideas to remember to come back to when I have specific problems in the future
I will probably get around to Celko's SQL For Smarties in the future.