stoolpigeon writes "MySQL is frequently touted as the world's most widely used relational database management system. Many of the best known web applications and web sites use MySQL as their data repository. The popularity of MySQL has continued to grow while at the same time many were concerned by the lack of many features considered essential to a 'real' rdbms. Such naysayers have done little to impede the growth or development of MySQL. The first edition of MySQL in a Nutshell, published in 2005, gave users a handy reference to using MySQL. The second edition, published in 2008, covers many new features that MySQL fans proudly proclaim as an answer to all those critics clamoring for a better-rounded rdbms." Read below for the rest of JR's review.
O'Reilly's Nutshell books normally encompass two types of content; tutorials and command reference. MySQL in a Nutshell is true to that format. In this book though, the line between the two is not as cut and dried as in some of the other Nutshell books. The closest to pure reference is probably the documentation of MySQL functions. But there is always more than just a simple statement of function name and parameters. There are examples and when appropriate, Dyer explains function behavior beyond the inherently obvious. A good example would be when Dyer explains the output of Sleep() in the case of a user interrupting query execution with crtl-c.
The tutorials cover all of the basics but extend well into the meat of successfully administering an rdbms. The book begins with an introduction to MySQL itself, instructions on installation and a brief overview of the basics. These chapters make up the first section of the book and take up 35 pages. This means that the book is not an introduction to sql or using an rdbms. This book is first and foremost a reference for the MySQL user who has already moved past the introductory level. I don't think one needs to be an expert to use the book but there is no extended hand-holding for the novice. This is a plus in my opinion, rather than the publisher shoving in a bunch of extra material in an attempt to make the book useful to every reader regardless of their level of experience.
The second section, "SQL Statements and Functions", understandably comprises the majority of the text. This second edition breaks down the categories further, leading to an additional five chapters when compared to the first edition. This is evident with the first chapter, "Security and User Statements and Functions" a chapter that was not in the first edition. Here again the real strength is that the commands are not just documented but they are explained and illustrated with examples.
For the person already working as a MySQL DBA or aspiring to do so, there is excellent coverage beyond the basics. There is documentation on essential skills like back-up, recovery and replication. Another new chapter breaks out database table and schema commands on their own. The brief, but thorough documentation of these features makes this volume extremely useful to the DBA moving to MySQL from another rdbms. One struggle for me, coming to MySQL from Oracle has been that sometimes things are just done very differently than I expect. I don't need a lot of background, I just need to know the MySQL method and this book makes that quickly available and gets me running until I have time to dig further into the why. I would think that this book is a must on the bookshelf of any DBA responsible for the care of MySQL.
Section three further shores up this use with very thorough documentation of MySQL server and client tools. Chapter 15 covers mysqld and mysql. Chapter 16 covers command line utilities. There are roughly 30 utilities covered and I am sure that this chapter could be a real life saver for many. The book does not cover the gui tools available for managing and working with MySQL. This is a strength in my opinion. The tools are built on top of what is documented here and knowledge of the command line commands should adequately prepare the user to deal with any of the various gui tools available out there. This may be somewhat disconcerting to anyone coming from a MS SQL Server background. It's been my experience that folks who have only worked with MS SQL Server struggle when they don't have gui tools, whatever rdbms they are on. Fortunately for them there are a lot of options available to manage MySQL with a gui, they just aren't covered in this book.
The second group that could benefit the most from this book, beyond database administrators is the developer. The documentation of sql statements and functions is of course very useful. The fourth section covers APIs and connectors. It documents the c, perl and php APIs. These chapters follow the same easy flow of mix between documentation and tutorial. The beginning of the chapter covers the basics of connecting, executing statements against the database and the reference follows with the specifics of commands and accompanying examples.
Section five contains three appendices that cover data types, operators and server/environment variables. All three are concise but valuable and cover the information fully. The index does an excellent job of covering not only specific terms but subjects and makes it easy to find what the reader wants, even if they aren't sure of the specific command they are looking to read about.
The book is based on MySQL 5.0 and makes note of features that will be available in 5.1 and 6.0. This does not include master-master replication, since I mentioned that the book does cover that topic. But the section on replication will still be of use with that new feature I am sure. There were some formatting issues in my copy. I don't know if it was isolated or a part of a larger number of copies, I did not see it mentioned on the errata web page for the book. In the chapter on date and time functions, three of the sql examples have formatting errors. The last three characters of the last line of the example are repeated as a fourth line. I'm not sure how this crept in, and it is pretty easy to see that the characters are a typo as opposed to part of the statement but it did throw me for a moment when I looked at them. Anyone typing the command verbatim will get an opportunity to see what their client does with incorrect sql.
I think that this is an excellent book that will aid anyone who interacts with MySQL on a regular basis. There is no fluff, no cuteness and no attempt to do anything beyond providing quick access to key information. The book hits that sweet spot between providing too much or not enough. It does not try to be everything to everyone as I mentioned. It will not do all the lifting necessary to get someone who does not even know what an rdbms is to where they will need to be in order to make good use of this book. It does not dive deep on internals or more advanced topics. But what it covers in that wide middle, it covers very well.
You can purchase MySQL in a Nutshell from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.