I have a soft spot in my heart for O’Reilly Media. I was first introduced to O’Reilly, aka “the animal books” many years ago in college. I believe my first O’Reilly book was Unix in a Nutshell. It still occupies a space on my bookshelf. Next to it is Learning the Korn Shell. Later, O’Reilly moved beyond it’s traditional Unix and C into Oracle books. I really appreciated Oracle SQL*Plus: The Definitive Guide, when using SQL*Plus as a reporting tool (way back in 1995). Recently, I grabbed a copy of SQL in a Nutshell, Third Edition for my iPhone from the iTunes App Store.
Many of my technical books are reference books, meaning that you typically flip to the part you need at the moment as opposed to reading from cover to cover. O’Reilly’s SQL in a Nutshell certainly fits into this category, so I was curious to see how it would work on an iPhone.
Of course, the book is “SQL in a Nutshell”, not “mySQL in a Nutshell”, “Oracle in a Nutshell”, etc. So the book covers ANSI SQL2003 syntax (also known as SQL3), MySQL version 5.1, Oracle Database 11g, PostgreSQL version 8.2.1 and Microsoft SQL Server 2008. One of the changes since the second edition is a “reduced footprint”, which means that Sybase Adaptive Server and IBM DB2 UDB have been dumped from the discussion. I’m not surprised about Sybase (although SAP BusinessObjects Enterprise still supports it as a platform for its system and audit databases). But I was a bit puzzled why IBM DB2 was omitted, although I’m sure O’Reilly knows who their audience is.
The book is organized by topic according to the SQL3 standard as opposed to each database vendor having their own slightly redundant section. Although some might consider the first couple of chapters fluff or filler, I found them interesting, especially since my education was electrical engineering rather than computer science. Chapter one is entitled SQL History and Implementations and covers some academic database terminology, including Codd’s Twelve Principles of Relational Databases. Chapter two is entitled Foundational Concepts and reviews SQL2003 basics and sets the stage for Chapter three, which is the raison d’etre for the book: the SQL Statement Command Reference.
The book concludes with Chapter four, SQL Functions. I am frequently burned by moving amongst different database platforms. Because the book is organized by function rather than vendor, it’s a helpful presentation to understand which functions are common across platforms (although most have options and variations). Chapter four also includes, by vendor, all of the nonstandard functions. I began working with Oracle 7 in 1993 and assumed that everything I was learning was “standard SQL” – until I was on a SQL Server 6.5 project and wondered what happened to Oracle favorites like DECODE and NVL. Fortunately, most databases (including Oracle) now include a more unified CASE statement to use instead of DECODE. And COALESCE is a more flexible version of NVL, although I was surprised to see it is not part of the SQL standard, despite support from multiple vendors.
Having a handy reference on my iPhone means that there’s less stuff to carry (or miss) on traveling consulting engagements. Although SQL in a Nutshell is a book that I’d also like to have in my bookshelf, too. SQL in a Nutshell is available in the iTunes App Store or from traditional booksellers like Amazon.com.
- Purchase SQL in a Nutshell (paperback edition) on Amazon.com
- Purchase SQL in a Nutshell (Kindle edition) on Amazon.com
Disclosure of Material Connection: I received this book free from the publisher. I was not required to write a positive review. The opinions I have expressed are my own. Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”