Russell Dyer's "MySQL in a Nutshell", Reviewed by Steve McInerney

by Pamela Jones
Groklaw

July 20 2005

When I attended LinuxWorld in Boston, I met Russell [ http://www.oreillynet.com/cs/catalog/view/au/1250 ] Dyer in the press room. He was there for Unix Review, I believe. He was sitting right across the table from me, the table where all the journalists had their laptops hooked up to file their stories, and everyone was chatting and working simultaneously. I must say, it was quite impressive to see reporters laughing and kidding around and then read their very knowledgeable and fact-packed articles a few minutes later.

The other memorable thing was that when there was a fire alarm over the loudspeaker, none of them left the media room. Only I got up and dutifully played fire drill. A cynical bunch. And by the way, they were absolutely correct. There was never any real danger, as it turned out. I've wondered ever since at what point they might decide it was worthwhile to stop typing and get out of danger, but at the time, I was too shy to ask. All I could do was admire.

Anyway, Russ mentioned he was writing a book on MySQL. I asked him to let me have a look at it when it was published, with the thought of doing a review. He followed through when it was published in May, and I immediately saw it was over my head altogether, so I sent it to Steve McInerney who, as MathFox's right hand man, helps keep Groklaw running smoothly behind the scenes. Steve liked the book very much, with one quibble, and he has now written a review for us.

As for Steve's comment about my alleged "nagging," I will just point out, as women the world over will confirm, that women only "nag" when their very legitimate and reasonable requests are ignored.

: )

Just kidding, both of us. We get along wonderfully, which is testimony to Steve's good nature. I've been so fortunate with Groklaw that both MathFox and Steve volunteered to help, because they are both very even-tempered and pleasant. And very skilled. Steve jokes all the time, which comes in handy now and then, I must say. And Mathfox is unflappable. The truth is they have never once refused to help me when I asked for help. Thank you both so much for all you do for Groklaw and for me.

*******************************

MySQL in a Nutshell
By Russell Dyer
First Edition May 2005
Publisher: O'Reilly
Series: In a Nutshell
ISBN: 0-596-00789-2
352 pages
http://www.oreilly.com/catalog/mysqlian/

I'm sure most readers of Groklaw are aware that Groklaw runs on Linux servers, web services provided by Apache, the main code base being the Geeklog Weblog Software, written in PHP, and finally, all the data stored in a MySQL database. A classic software LAMP stack. All of this is then hosted by the very generous folk who run Ibiblio . Thus a review on a book about MySQL seemed quite apropos.

As one of the developers and maintainers for the various additions and add-ons we use at Groklaw, I have a fairly strong personal interest in new and useful books about PHP and MySQL. You're never too old to learn something new! Plus, as the Nutshell series are designed to be quality and complete reference books, saving time so as to deal with Pamela's latest "feature request" aka "nag", is always a positive. ;-)

So, having had a slow skim read of the entire book, I'd like to pass on my thoughts and observations of this quite excellent addition for anyone who programs with and for MySQL databases.

The book starts much like any other book on any one of dozens of titles on a wide variety of products. Introduction, How to Install, Basics. It's not until we get to chapter 4, "SQL Statements" that the fun and value of this book begins in earnest.

A word of warning: This is not an SQL primer book. You are required to know and understand SQL already, but as an SQL reference in line with the nutshell ethos, this chapter is brilliant!

All the commands are clearly laid out, with all the options and even useful examples! If only Geeklog was documented so well. ;-)
One example of this clarity is with the "ALTER TABLE" command. The explanations cover about 4 pages and with several examples covering the major types of table alterations via this command. Lovely!

As can be seen from the O'Reilly web site, there are extensive chapters on all the various functions available as well. I did laugh at the PHP API chapter being Chapter 13. It seems so delightfully ironic.

Unfortunately this is also where the book does not live up to the full promise of its title. The book is a programmer's reference, it is not a system or database administrators reference for MySQL. The chapters dealing with the command line tools and daemons are little more than rehashes of man pages.

I personally would have at least liked to have seen better and more detailed explanations of the mysql command line tool. We have to do some moderately funky tricks to extract certain types of data from Geeklog due to the Ibiblio architecture (Observation, not Criticism). How to do the weird and wonderful methods of using the command line mysql tool would be most useful. More examples, please!!

In summary, if you program with/for MySQL databases, then I do recommend this book as an excellent reference guide into all things programmy about MySQL. It certainly won't be spending a lot of time of my shelves gathering dust!

If you're a systems or database administrator you may need to keep looking.

If anyone does discover a nasty bug in the SQL code and/or usage with Groklaw and my changes therein in future, well, now you know which book author to blame!

Enjoy and Happy Coding!

09:30 PM EDT

Copyright 2005 http://www.groklaw.net/ - http://creativecommons.org/licenses/by-nc-nd/3.0/