Book Reviews   Digital Libraries   Astronomy Log   Software   About  
Managing & Using MySQL
Author: George Reese, Randy Jay Yarger & Tim King with Hugh E. Williams
Pages: 425
Publisher: O'Reilly & Associates
ISBN: 0-596-00211-4
Summary: A decent introductory text on managing and programming MySQL.
Review Date: 6 Feb, 2003

If you're new to databases and looking for something easy to learn and very inexpensive (free for starters), then MySQL might be the right database for you. O'Reilly's Managing & Using MySQL provides a good introduction to this Open-Source database, particularly if you will be programming applications that use MySQL. If you're planning to do more database administration than programming, you might want to look elsewhere though.

Managing and Using MySQL is divided into four sections. The first section covers the very basics of databases, steps for installing MySQL on UNIX from source or from binaries, and instructions for installing MySQL on Win32 platforms. Following this is a rapid introduction to SQL according to MySQL. Having read O'Reilly's book on Postgresql, I'll have to say I thought the coverage of SQL there was quite a bit better than in this volume, however.

Finishing up this first section is a chapter on MySQL administration. With a title like 'Managing MySQL,' I would have expected much more coverage than is offered on MySQL database administration topics, such as a reference to configuration variables, and much greater depth overall than what is offered, but such is not to be found. Nor can one find coverage of replication in this volume which is a pretty popular topic if you're looking for high availablility or redundancy from your MySQL systems.

The next section focuses more on administration, with discussion on performance tuning, security, and database design, but again, I found the information somewhat superficial. That's not to say the book isn't useful in its sphere. The discussion on EXPLAIN SELECT, for example, will be quite helpful for anyone trying to find out why a particular query is running slow. Coverage of the various access mechanisms available for MySQL will also be helpful to anyone trying to make heads or tails of how to secure their databases. The discussion in this section on database design was enlightening as well, and would provide a fairly adequate introduction to relational database design for a beginner (As long as they also got a healthy dose of C.J. Date's writings to boot).

Section 2 launches into coverage of several different programming interfaces for MySQL. First up is everybody's (ok, maybe not everybody's) favorite language, Perl. The material provided discusses accessing MySQL databases with Perl via the perl-DBI modules, but the real sparkler of the section is a nice introduction to the Model/View/Controller architecture for application development.

By way of example in this chapter, the authors provide a full implementation of an abstract, reusable Model layer, which includes a caching mechanism. An example is given of how this code can be used to access an example publishers database. This code will be helpful to anyone looking for a starting point in developing robust application code with Perl and MySQL. One drawback I found annoying, however, was the occasional inconsistency in code indentation in the examples given. Minor, but potentially confusing.

The next language covered is Python, but the water is not so deep here as it was for Perl. Here you'll find mainly coverage on the standard methods for accessing MySQL databases with Python and some practical examples of this type of access. Next up is PHP, including a basic language primer, and a sample application to demonstrate how to interact with MySQL using PHP, as well as using some of PHP's functionality such as session support to enhance your applications. Next is coverage of the C API for MySQL which provides a very good introduction to using the C API for anyone so inclined. Finishing up the suite of languages covered is Java, and examples are given of accessing MySQL with Java via JDBC.

To cap off the section on programming, the authors provide a chapter on extending MySQL with your own user-defined functions. Such functions can be written in any language which can be compiled into a native shared library, but examples are given in C only. Coverage includes simple functions, as well as implementing your own aggregate-style functions. The information provided would be a great starting point for anyone interested in extending the capabilities of their MySQL database.

The final section of the book is a hefty chunk of pages devoted to reference material. Included is a full reference of MySQL SQL syntax. Each entry in this section includes a descrtiption of the syntax elements, and usually several examples of how the command is used. Also included is a reference section covering all the MySQL data types, followed by a chapter on Operators and Functions, and finally references for the C, PHP, and Python APIs. Again, most of these entries contain helpful examples of how each function is used.

Overall the book will be very well suited for a programmer starting out with MySQL, and the reference material provided will be useful for those more experienced in the matter. MySQL DBAs may be disappointed by the shallow coverage of their arena, however. Newbies just getting introduced to MySQL will get a decent foundation, but I'd recommend complementing this volume with others in the market.

In the interest of full disclosure I have to declare myself firmly in the Postgresql camp of the Open-Source database wars, but I felt it healthy to broaden my horizons by learning more about the capabilities of MySQL, as I do use MySQL occasionally at work. The philosophical differences of the two camps does show itself from time to time in the book. My favorite comment from the first section of the book basically sums up (in my opinion) the philosphy of the MySQL camp as a rule of thumb, "Applications themselves should generally worry about foreign key integrity." Bzzt, incorrect (except when you're using MySQL), but spoken like a true programmer ;-).

As you can probably tell, I wasn't overly impressed with the book as a whole, but that's not to say it's not useful. Most likely anyone using MySQL on a regular basis will find it helpful, particularly with the reference material it provides, and it will also be very helpful for anyone who might be learning to program with MySQL in one of the languages covered in the book. While I can't agree with a lot of the MySQL philosophy of database design, I can say that this book has been useful to me in day-to-day interaction with MySQL.

Overall rating: 7

Happiness
True love begins when the needs of others become more important than your own.
The practice of true love begets true happiness

Me

Daniel Hanks

I'm a system administrator working for Omniture

Interested in

perl
books
python
databases
genealogy
astronomy
digital archival
digital libraries
web applications
web infrastructure
distributed storage

among other things . . .

Storyteller


Pamela Hanks

is an excellent storyteller.

(She also happens to be my wife :-)

A storyteller makes a wonderful and unique addition to family, school, church or other group events. Schedule her for your next gathering.


Kiva.org
Kiva - loans that change lives

Recent Blog Entries

Subscribe with Bloglines
- OpenWest Conference 2014 Presentation Slides - Ansible
- OpenWest Conference 2013 Presentation Slides
- Utah Open Source Conference 2012 - Presentation slides
- E-Book Review: Data Mashups in R
- Book Review: Illustrated Guide to Astronomical Wonders
- Book Review: Wicked Cool Shell Scripts
- PLUG Presentation Slides: The Open Source Data Center
- Harnessing human computational power from computer games
- I love a good roadtrip
- FamilySearch Developers Conference 2008 presentations now available online
- FHT follow up: an idea for a mobile genealogical application
- Family history and technology: it's only getting better
- President Hinckley passes away
- December is NaBoMoReMo - National Book of Mormon Reading Month
- Family History, Photos, Blogs, and Books
- The Compact Oxford English Dictionary
- 1830s English and the Book of Mormon
- Google adds My Library feature to Book Search
- Utah Open Source Conference
- Wiki diagrammer (Steal this idea!)

All Entries . . .

LDSOSS
LDS Open Source Software
A website discussing the use of Open-source software for applications useful to those sharing values of the Latter-day Saint (Mormon) faith.

© 2009, Daniel C. Hanks