Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Image

MySQL in a Nutshell 86

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.
MySQL in a Nutshell
author Russell J.T. Dyer
pages 561
publisher O'Reilly Media, Inc.
rating 9/10
reviewer JR Peck
ISBN 978-0-596-51433-4
summary A Desktop Quick Reference


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.

*

This discussion has been archived. No new comments can be posted.

MySQL in a Nutshell

Comments Filter:
  • Re:Timely (Score:3, Interesting)

    by Daniel Dvorkin ( 106857 ) * on Monday December 01, 2008 @03:12PM (#25949265) Homepage Journal

    I've continued to find dead-tree references for various languages, DBMSs, etc. useful through several version changes. Of course any IT book is out of date before it's published, but the value of a good printed reference makes up for it relative to the up-to-the-minute nature of (good) online documentation. Both are important; neither is inherently superior to the other.

  • Why MySQL? (Score:2, Interesting)

    by Anonymous Coward on Monday December 01, 2008 @03:14PM (#25949317)

    I know this is going to get modded Troll or Flamebait, but why has MySQL grown in popularity while PostgreSQL has remained a distant #2 in the open-source RDBMS "market"? I just don't understand it. Can I get a [relatively] objective analysis of this phenomenon?

  • Re:Timely (Score:2, Interesting)

    by reginaldo ( 1412879 ) on Monday December 01, 2008 @03:39PM (#25949771)
    Any reference book that I have purchased previously has ended up collecting dust on my bookshelf. I guess they are good for reading when I am away from the computer, but the internet is better resource for programming, especially with software that is as well documented as MySQL.

    I would have a hard time believing this book is better than the Sun documentation [mysql.com].
  • Re:Feature creep (Score:3, Interesting)

    by Bill, Shooter of Bul ( 629286 ) on Monday December 01, 2008 @03:40PM (#25949799) Journal
    You mean drizzle [livejournal.com]?
  • by swordgeek ( 112599 ) on Monday December 01, 2008 @04:11PM (#25950367) Journal

    Well judging from your posting history, you seem to be an idiot with a vendetta against books.

    I remember News for Nerds. I also remember book reviews on /. before your user account # was created.

    However, if, as you claim, the reviewer was actually paid for his article, then you're absolutely right! How did you find this bit of information out, though? I'm curious to see the trail.

  • SQLite (Score:5, Interesting)

    by Mr. McGibby ( 41471 ) on Monday December 01, 2008 @04:24PM (#25950609) Homepage Journal

    MySQL is frequently touted as the world's most widely used relational database management system.

    That would actually be SQLite. It's in cellphones, set top boxes, and all sorts of other embedded devices.

  • Re:Why MySQL? (Score:3, Interesting)

    by Achromatic1978 ( 916097 ) <robert@@@chromablue...net> on Monday December 01, 2008 @09:43PM (#25954167)

    Most "web developers" may well use windows as their local client but no one worthy of the tag is developing web apps on their local machine.

    Wow. Really? It's funny that later you talk about "the type of holier-than-thou uber-geek that puts everyone off", but you're pretty much as guilty of it as anyone else.

    Because, y'know, I could have sworn that the software I'm watching being written, to be used by many thousands of end users and the general public, was largely written by people using Zend Studio for Eclipse on Windows boxes. Either that, or that "AJAX, three tier, fully OO, MVC, buzzword compliant" stuff isn't, in your mind, a "web app".

    Or the previous job I had, where I oversaw a team that developed exclusively on Windows, and whose site we were responsible for saw eleven thousand dynamic page views on the home page alone.

    But hey, like you say, 'not worthy of the tag'.

  • by nluv4hs ( 1422261 ) on Tuesday December 02, 2008 @02:08PM (#25962629)
    I know the subject sounds inflammatory but I have hard numbers and a simple, yet realistic example. I would like it if someone would show me how to coax MySQL to perform as well as PostgreSQL for this simple query. It's been over two months since I posted this problem in two very [mysql.com] public forums [mysqlperformanceblog.com], with no response from the MySQL community. Would someone please stand up for MySQL and save it from looking weak here?!

The hardest part of climbing the ladder of success is getting through the crowd at the bottom.

Working...