The Definitive Guide to MySQL 5, 3rd Edition

Definitive Guide to MySQL 5, 3rd Edition

Even though MySQL is the most popular open source database system in the world, it is not always easy for MySQL administrators and developers to quickly find the answers to their questions. The online MySQL Reference Manual for the current version, 5.0, is extensive in its coverage of the database system and the details of its commands, but it is more geared towards providing the "how" and little of the "why". MySQL books attempt to fill this need, but most are introductory volumes that lack comprehensive coverage. MySQL administrators and developers more frequently need a solid reference book, such as The Definitive Guide to MySQL 5, by Michael Kofler.

Published by Apress on 4 October 2005, with the ISBN 978-1590595350, The Definitive Guide to MySQL 5 is currently in its third edition. The publisher maintains a Web page devoted to the book, where the reader will find a link for purchasing the electronic version of the book, downloadable source code, an online table of contents, errata, and a sample chapter (Chapter 8, on database design).

In addition, the author has a page for the book on his own website, where the reader will find links to previous and foreign language editions, the back cover text and table of contents, links to reviews, downloadable sample files, mssql2mysql (a tool for converting from Microsoft SQL Server to MySQL), many MySQL-related links, and a link to a book discussion forum, where people can post questions about MySQL, and offer answers to other people's questions.

The book is organized into six parts, containing 23 chapters and three appendices. Part 1 serves as an introduction, and its three chapters provide an overview of relational databases in general, and MySQL in particular, including its licensing. The second chapter explains how to install Apache, MySQL, PHP, and Perl, under Windows and Linux. The author also explains how to configure Apache, PHP, and MySQL, in order to create the test environment used by the book's examples. The third chapter illustrates the use of MySQL with PHP, to allow visitors to a site to vote in an online poll.

The second part of the book covers the major administrative tools and user interfaces that the typical MySQL administrator would find invaluable. These include phpMyAdmin, which has fast become a favorite. For any developer who needs to access a MySQL database from within a Microsoft Office program, Chapter 7 should prove quite handy, as Kofler discusses how to install and use ODBC and JDBC.

Part 3 covers the fundamentals of using MySQL: database design, SQL introduction and recipes, access administration and security, GIS functions, stored procedures and triggers, and server configuration and administration.

The value of any database system is how well it supports stand-alone applications and websites that need to use it as a dynamic data store. The fourth part of the book explains how to use MySQL in conjunction with PHP, Perl, Java, C, Visual Basic (6, .NET, and C#).

Part 5 serves as the primary reference section for the book, and is grouped into three chapters, covering SQL, MySQL tools and options, and the MySQL API. Some busy readers may prefer such reference material to be organized into a book, given that one can flip through a book's pages faster than the Web pages of any online reference manual. Yet in this case, the correctness and completeness of the book's index, is paramount. Sadly, this book's index is fairly limited, and largely consumed by MySQL function names. This may be unavoidable, given the likely overwhelming number of potential entries in such an index. Regardless, that is one area where the online references can easily outshine a book, as they allow fast searching, within a site and within a single Web page.

The book's three appendices comprise a glossary, links to where to find the book's files online, and a bibliography, which strangely contains books that appear to have nothing to do with MySQL, but are written by Kofler.

One commentator on the Slashdot book review complained that the book assumes that several non-essential tools — specifically Apache, PHP, phpMyAdmin, and Perl — have been installed, and then hits the reader with an introductory chapter (Chapter 3) which uses PHP. In fairness to the author, one can't expect such a book to begin with complete installation instructions for all of the tools that might be used with MySQL. Any technically proficient reader who intends to use those tools, should be able to find, understand, and implement each tool's installation instructions, which cannot be expected to be included in a database book. Nonetheless, Chapter 2 does discuss installation of most of those tools.

This book has advantages over some others in its category, such as when the author contrasts the old and the new ways of performing particular operations within MySQL. Also, there are a generous number of examples throughout the book, which is certainly not offered in all technical reference books.

But no work is perfect, and this one is no exception. Many of the explanations within the book are poorly worded, and end up being confusing. This may be a consequence of the book not originally being written in English, but instead translated from another language — possibly German.

Reviewers on note that the book contains technical inaccuracies, such as statements that are false or would result in extremely poor performance. In addition, the book claims to assume no previous knowledge of SQL or databases, but depends upon that knowledge throughout most of the early chapters, referring the poor reader back to chapters 8 through 10.

However, for someone already knowledgeable of SQL and relational databases, my main complaint with the book is the inexcusable formatting of the PHP, Perl, Java, and C source code. Program operators, strings, parentheses, and other program tokens are jammed together with apparently no thought to readability.

Overall, The Definitive Guide to MySQL 5 contains a wealth of information, and despite its flaws, could serve the needs of any database administrator or programmer who wants to get the most out of MySQL. It should be hoped, however, that if the author and publisher pursue a subsequent edition, then the aforesaid issues be addressed.

Copyright © 2006 Michael J. Ross. All rights reserved.
bad bots block