Slashdot Mirror


The Definitive Guide to MySQL, 2nd Ed.

Craig Maloney writes "I'm skeptical whenever a publisher uses the words 'Definitive,' or 'Complete,' or (especially) 'Ultimate' in the title of a computer book. Sadly, the typical book so labeled is a jumble of incomplete ideas crammed together with very little depth. Worse, some books do little more than re-print the various command-line switches for the application. Michael Kofler's The Definitive Guide to MySQL (2nd ed.) is just the opposite. There're still lots of ideas crammed inside of the book, but they're carefully explained and expanded. The book weighs in at a hefty 802 pages, with very little fluff. " Read on for the rest of Maloney's review. The Definitive Guide to MySQL author Michael Kofler pages 802 publisher Apress rating 10/10 reviewer Craig Maloney ISBN 1590591445 summary A useful and complete reference to using and programming with MySQL

The book has four sections: Introduction, Fundamentals, Programming and Reference. The Introduction begins with a brief introduction to databases, relational databases, ANSI 92, and how MySQL fits in to each of these. It also touches on the licensing for MySQL (commercial vs. non-commercial usage) and a version roadmap for past and future releases of MySQL. The roadmap is very helpful to know what features are present in the version of MySQL you may be using (or are planned for an upcoming release).

Next, Kofler sets up a rudimentary testing environment which is used through the rest of the book. He does an excellent job of outlining a decent development environment under both Unix and Linux without getting too bogged down in trying to describe every single user interface for accessing MySQL (those are described later in the book). It steps through setting up MySQL, Apache, Perl (with DBD and DBI), and PHP, and also adds phpMyAdmin as a graphical tool to administer the databases. The unit ends with a simple PHP script to handle an opinion poll. This all happens in the first 80 pages of the book.

Fundamentals

The next section expands on the basics learned in the first chapter. First is a chapter on the user interfaces available for using MySQL, starting with the MySQL command-line client, followed by an introduction to several graphical clients (including phpMyAdmin and MySQLCC). Database design is covered in the next chapter, starting with a brief overview of the theory in designing a relational database. First, second and third normal forms are introduced with examples, as are relations (1:1, 1-n, and n-n), data types, and indexes. Once the reader is armed with the theory, the book continues with how to create the tables in SQL, and covers using SQL to examine and manipulate data in "Introduction to SQL." "SQL Recipes" contains lots of useful scripts for handling interesting cases of SQL (like selecting data at random, pivot tables, creating a new table by copying, etc). A special section is devoted to the new InnoDB format, which brings transactions and integrity rules (foreign key constraints) to MySQL. "Security and Administration" complete the Fundamentals unit with topics on user-level security, backing up the data, and replication between two MySQL instances.

Programming

Unlike most books, the programming languages introduced in The Definitive Guide to MySQL aren't introduced with examples as though you have never programmed a computer before. (So beware, if you haven't; this is probably not the right book for you.) The examples start with useful code that assumes familiarity with the language. The examples are excellent, demonstrating how to efficiently get your code connecting to the database. The author covers PHP, Perl, Java, C and C++, and Visual Basic, C# and ODBC. PHP is the real star of the book, though, garnering a second chapter to expand on the earlier examples presented in the book, but the other languages (and ODBC) are given excellent treatment. Fans of these languages will be able to get their programs running with MySQL using the examples from the book.

Reference

The last 100 pages (not including the appendix, glossary and index) contain several references for MySQL. "The SQL Reference" covers the SQL commands that MySQL understands (along with what versions they are valid for), as well as system and session variables and data types. Coverage of the utilities that MySQL uses is in the "MySQL Tools" section. Lastly, the API reference rounds off the book with the functions and variables for each language in an easy-to-use reference. Whew!

Programmers will find excellent examples for linking their programs with MySQL, and developers will find the reference and examples extremely useful for taking their data from creation to deployment. I found this book easy to read and exceptionally useful. The author did the hard work of taking the documentation and sifting through it to bring the useful parts together clearly and concisely. Definitive indeed.

You can purchase The Definitive Guide to MySQL from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

128 comments

  1. Interesting book but by 2.7182 · · Score: 2, Interesting

    the binding on my copy broke after a month. Anybody else have this trouble ?

    1. Re:Interesting book but by Anonymous Coward · · Score: 0

      I've lived with a copy of this book for quite some time (have the 1st edition too), haven't had this problem.

    2. Re:Interesting book but by sodul · · Score: 1

      "Also, a bunch of the pages were sorta stuck together."

      I know we slashdot readers are geeks but this is a technical book, not a Playboy !

    3. Re:Interesting book but by ValuJet · · Score: 2, Funny

      The pages won't stick together if you lay off the porn when you have the book open.

    4. Re:Interesting book but by tarquin_fim_bim · · Score: 0

      the binding on my copy broke after a month

      What no rollback?

    5. Re:Interesting book but by DevNova · · Score: 5, Informative
      There is a technique to use with new books that will almost completely eliminate books breaking at the binding. I learned this in a speed reading course over ten years ago and in that time, I have never had a book binding break on me.

      First, hold the book so the binding is resting on a hard flat surface (let's say a table), as if you are about to open it. Fold back the front and back covers so they are flush with the table.
      (end view, ignore dots)
      .....|||
      .....|||
      _____|||_____
      Run your thumb up and down the crease where the covers meet the binding, helping them to lie flat.
      Now take 8-15 pages from the front of the book and 8-15 from the back of the book and lie them flat, again running your thumb along the binding to help flatten them out. Continue this process inwards, continually flattening the pages out until you come to the middle of the book an do a final "press" down the middle.
    6. Re:Interesting book but by runderwo · · Score: 1

      Sounds like such a book would be a perfect match for MySQL.

    7. Re:Interesting book but by owlstead · · Score: 1

      802 / 25 (say 12,5 pages per fold) ~ 32 folds, if you were wondering. Reading the book will be more work though.

    8. Re:Interesting book but by Tablizer · · Score: 1

      There is a technique to use with new books that will almost completely eliminate books breaking at the binding...

      Can't somebody invent a machine that does this at the printing factory? Or dare I say.......offshore it.

      Anyhow, thanks for the tip.

    9. Re:Interesting book but by acvh · · Score: 1

      wow, haven't seen that in a while. we were taught to do this in grade school with new textbooks. it made them easier to read flat when you were working at your desk.

    10. Re:Interesting book but by Anonymous Coward · · Score: 1, Funny

      Then do the exact same thing with your girlfriend and she'll be yours forever!

  2. I wonder... by rackhamh · · Score: 4, Funny

    ... how does a "definitive" book get to have a 2nd edition? Wasn't the 1st edition definitive? :P

    1. Re:I wonder... by AlphaJoe · · Score: 1

      New versions of MySQL dude...

      --
      A computer once beat me at chess, but it was no match for me at kick boxing.
    2. Re:I wonder... by Anonymous Coward · · Score: 0

      Because this is now the ultra deluxe definite edition. With the super limited ultra deluxe definite edition to come out in 3 months time with a mysql dolphin toy, whilest stocks last.

    3. Re:I wonder... by jacksonj04 · · Score: 1

      I was just about to make the same comment. Maybe they could have The Even More Definitive Guide to MySQL?

      --
      How many people can read hex if only you and dead people can read hex?
    4. Re:I wonder... by Nobody+really · · Score: 1

      Actually, the first edition was not "definitive." Seriously, it was just titled "MySQL."

  3. Definitive Complete Ultimate comment by Russ+Nelson · · Score: 4, Funny

    This is the Definitive Complete Ultimate comment on this story. Moderators: you can now mark all other comments Redundant.
    -russ

    --
    Don't piss off The Angry Economist
    1. Re:Definitive Complete Ultimate comment by DarkHelmet · · Score: 0, Redundant

      Of course, the fact you had to mention your post as such makes it definately redundant.

      --
      /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    2. Re:Definitive Complete Ultimate comment by Squeebee · · Score: 4, Funny

      This is the Definitive Complete Ultimate comment - SECOND EDITION - on this story. Moderators: you can now mark the previous comment Redundant.

  4. Examples by cuteseal · · Score: 3, Interesting

    "PHP, Perl, Java, C and C++, and Visual Basic, C# and ODBC" Does the author show each and every example in all these languages? If he did, no wonder the book's 800+ pages long!

  5. My guess by FullMetalAlchemist · · Score: 4, Interesting

    My guess is that MySQL will decline now that PHP uses SQLite, and that PostgreSQL has so much more speed, stamina, strength and beauty.

    Still, it's good that comprehensive book is released, some will sure find it useful.

    Now, someone point me to a nice book on SQLite integration with .NET remoting and I'll be really happy.

    1. Re:My guess by tcopeland · · Score: 1
      > now that PHP uses SQLite

      FWIW, there's also a nice SQLite binding for Ruby:
      require 'sqlite'
      db = SQLite::Database.new( "test.db" )
      rows = db.execute( "select * from test" )
      Good stuff!
    2. Re:My guess by tcopeland · · Score: 2, Interesting

      > PostgreSQL has so much more speed,
      > stamina, strength and beauty.

      The PostgreSQL database on RubyForge has been slowly growing over the past year or so... it's up over 825K records and ticking along smoothly. I can't see ever going back to MySQL unless forced to...

    3. Re:My guess by scribblej · · Score: 2, Interesting

      Does anyone today look at the available technologies, and actually choose MySQL over PostgreSQL? I mean, assuming they aren't already using any database, and they don't have any requirements that would force them to MySQL (like a PHB saying, "But I've HEARD of MySQL! What's this Postgres crap?")... why would anyone choose MySQL?

    4. Re:My guess by tarquin_fim_bim · · Score: 1, Funny

      I don't think they have yet published an Idiots Guide to PostgreSQL. Thus no idiots, lets just keep it to ourselves OK?

    5. Re:My guess by Phillup · · Score: 3, Informative

      I guess it depends on what you call "available technologies".

      If you look at web hosting, you almost always see MySQL as "available" while PostgresSQL is a bit more rare.

      That is, IMHO, why PHP is so popular... and the same goes for MySQL.

      They are ubiquitous.

      --

      --Phillip

      Can you say BIRTH TAX
    6. Re:My guess by jabber-admin · · Score: 1

      Results 1 - 10 of about 22,600 for "shared hosting" postgresql. Results 1 - 10 of about 638,000 for "shared hosting" mysql. (0.35 seconds) You use what you have, especially people just getting started with a $9.99/month host.

    7. Re:My guess by runderwo · · Score: 2, Insightful
      1. MySQL has a solid Win32 port.

      2. MySQL has an entire community dedicated to helping people with the problems caused by its defects.

    8. Re:My guess by Phroggy · · Score: 1

      My guess is that MySQL will decline now that PHP uses SQLite, and that PostgreSQL has so much more speed, stamina, strength and beauty.

      Do I remember hearing that Apple's Searchlight feature in the upcoming Mac OS X 10.4 ("Tiger") uses SQLite as well?

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    9. Re:My guess by imogthe · · Score: 1
      For my own part I started using MySQL to satisfy my database needs because I read an article about it in some Linux magazine. At the time I did not hear of any alternatives (such as PostgreSQL), nor did I care much. MySQL, at the time, was all I needed to store my DVD database. It may not have sub-stored procedural selects and three dimensional locking over-views but it did (and still does) all I need.

      Will I change to PostgreSQL? I don't know. I am sure there are good reasons to do so, and good reasons not to.(I only use the most fundamental SQL functions anyways)

      In the end I feel it's all about apples and oranges. It scratches my particular itch.

      And for the PHB quote: MySQL has an actual company "backing" it. It adds credibility in the heads of PHBs :)

    10. Re:My guess by ahodgson · · Score: 1

      I have single tables with over 100 million records in PostgreSQL. It rocks.

    11. Re:My guess by aled · · Score: 1

      Interesting. Is there any theory on why mysql is popular to web hosts?

      --

      "I think this line is mostly filler"
    12. Re:My guess by thin_skin_not · · Score: 3, Interesting

      There are other reasons besides superior technology for choosing MySQL over Postgresql. For one, I program in Perl and use the very excellent Active state debugger on a Windows XP box. There is no DBI module for Postgresql under Windows so I can't walk through my code if I choose PGSQL. I also use a Windows box because my editor (PFE32) can be set up for my keyboard while Linux(any version) cannot. Until Linux decides to support keyboards with function keys, arrow keys, pgup, pgdn,home,end, etc. and makes ALL the keys do exactly the same thing under every program (delete and backspace in particular) I will never be able to work at a Linux desktop. Sure I would like to have features such as stored procedures and triggers and all that, I am not willing to program with no debugger and use vi as an editor to do it.

    13. Re:My guess by Squeebee · · Score: 1

      The problem with that logic is it assumes MySQL depends on PHP for it's usage. If this were true, then when SQLite was intorduced nobody would have been complaining of having to link MySQL manually when installing PHP. And of course, PHP-MySQL is not the only combination under the sun, MySQL is used with many apps.

    14. Re:My guess by Anonymous Coward · · Score: 0
      It's[sic] syntax, performance, features.. Everything about it sucks.

      Yeah, well your syntax ain't too good neither, Bub.

    15. Re:My guess by ngunton · · Score: 5, Insightful

      In my experience, MySQL works very well. I am fully aware of all the "gotchas" out there, and the reasons why MySQL is such a toy, shouldn't be used for anything ever, etc, but to be honest there are a couple of things putting me off trying PostgreSQL:

      First, I honestly am repelled by the fanboys who immediately pop up like clockwork whenever MySQL is mentioned and say that it is a piece of crap, and PostgreSQL rocks. MySQL is not crap. Perhaps PostgreSQL does rock, but all the obnoxious "advocates" for PostgreSQL just remind me of so many religious fanatics. It's at the point where I don't even care if they have a point or not, it's just too shrill and monotonous. Whenever MySQL gets mentioned, I can GUARANTEE that someone will pop up screaming about how crap it is and why isn't everyone using PostgreSQL instead. I have been using MySQL for about four years now, and so I know from personal experience how well it works. There are probably some things that PostgreSQL does better, perhaps many things, I don't know. I just know that there are many things that MySQL does perfectly adequately or even extremely well, for me, and no amount of "sorry but you're simply wrong" can dissuade me from this opinion, since I am speaking from personal experience over a period of years. Also, there are many companies using MySQL in a major way, if it was so crap then why/how would this be. Never mind, I suppose all those companies are just totally clueless. I suppose now people will also put me down for not being a "real" DBA or something. Whatever.

      Secondly, MySQL is simple. When I first tried using it, the thing "just worked". Everything is there in the package. Whenever I tried looking at PostgreSQL (not recently, see above) it always seemed much more complicated and not as friendly. Well, I have something that has been working very, very well for me for a long while now, so why put myself through all that hassle? Whether it actually is or not, PostgreSQL *seemed* harder and more complicated. The documentation seemed more geared toward people who are willing to really dig into this stuff in a big way and learn all the wrinkles for tuning your database. Whenever someone criticizes PostgreSQL for this, someone seems to reply that a database *shouldn't* be used by someone "out of the box", without thinking much about all the tuning and suchlike. This is a very elitist viewpoint, imho, there are many people out there who simply want a database that "just works". It's worth noting a simple truth, that Simplicity Rules. It doesn't matter how technically brillian your tool is, if it appears to be complex then people will probably use the simpler competitor instead, even if it isn't as technically brilliant as your baby.

      So, here's my point: If the PostgreSQL crowd could be a little bit less aggressive in their hostility toward MySQL, and focus instead on making the toolkit as easy to use and accessible as MySQL, then perhaps they would win over more people and become more popular.

      Just my opinion.

    16. Re:My guess by Anonymous Coward · · Score: 0

      Because of PHPMyAdmin
      Now there's PHPPgAdmin but it's nowhere near PHPMyAdmin.

      GUI tools make or break an RDBMS...
      MS-SQL's administrator tool is quite good, which makes it highly usable.

      MySQL had MySQLcc which was quick and clean and worked 'okay'. They're moving on to MySQL-Administrator and MySQL-query browser, which are very buggy but very promising...

      PostgreSQL has PgEasy which is cluttered as fuck (although kudos for using wxWidgets) but seems to be getting a bit better at every release.

      I'm sure oracle, SAP and peoplesoft have really neat stuff too but I've only used SQLPlus on oracle.

      I have yet to find a decent-looking simple, clean, fast and not-too-buggy PostgreSQL administration tool for linux. I need something for user management, performing queries, administering tables, etc... so the only solution is the cluttered PgEasy...

    17. Re:My guess by Ztream · · Score: 1, Redundant

      Well, there's a reason us Postgres fanboys behave like that. MySQL gets a LOT of press and is widely recognized. Postgresql gets almost none.
      If you've used both and found Postgres to be superior, and more or less fell in love with it, you get frustrated at the lack of public awareness. This causes us to take every opportunity we can to "inform" (annoy) people about this wonderful thing that we've found. Of course, /. is probably the worst place since Postgres awareness is probably comparatively high around here -- but it is a place where we can easily complain and bring the issue up. What we should be doing is perhaps writing letters, but we have no high hopes of competing with MySQLs press releases and the thinly veiled collections of ads that management like to read as magazines.

      So in short, yes, we're annoying, but if you found a cheap wonderful car that ran on tap water and realized no one had ever heard about it, you would be frustrated and evangelic too.

    18. Re:My guess by Anonymous Coward · · Score: 0

      Replication. MySQL has decent replication (stable, tested, proven), PostgreSQL has only an alpha-quality implementation.

      If PostgreSQL had decent replication, I'd use it. But it doesn't, so I use MySQL.

    19. Re:My guess by Anonymous Coward · · Score: 0

      Excellent, couldn't have said it better. Thanks ngutton!

    20. Re:My guess by DAldredge · · Score: 1

      Have you tried http://dbd-pgpp.sourceforge.net/? I haven't used it, just heard of it.

    21. Re:My guess by Anonymous Coward · · Score: 0

      Not true. PostgreSQL's replication (Slony-I) is release-quality, and I believe it is in use by the Afilias, the .info domain registry (they also operate .org). That sounds like tested and proven to me.

    22. Re:My guess by Pfhreakaz0id · · Score: 0

      I get it now. MySQL v. PostgreSQL is the open source equivalent of the closed source MSSQL v. Oracle (without the cost argument)

    23. Re:My guess by taradfong · · Score: 1

      I have to tell you that while yes there can be some frustrations with terminal settings, there is a big, bright blue world out there for you to see if only you'd invest some time in working through it. Yeah, PFE was a clean little editor, but you could be doing a *LOT* more things a *LOT* easier by learning how to use the *nix set of tools. I don't want to diss the way you work but give it a shot!

      --
      Does it hurt to hear them lying? Was this the only world you had?
    24. Re:My guess by jadavis · · Score: 1

      If you have time to care about databases, but you're turned off by the PostgreSQL community, just pick up a book that describes the relational model.

      On the shelf next to me I have one of the best books I've ever bought, called "An Introduction to Database Systems" by C.J. Date.

      Read some of that, and pick up some database that you haven't used before, like DB2, Oracle, Sybase, whatever. Those probably all have free trials. Try to understand the reason so many companies spent so much time and money perfecting a few good database concepts (constraints, referential integrity, and abstraction from physical storage).

      It may be more of an academic journey than a practical one for most people, but I found it very interesting. PostgreSQL isn't the only way to open your mind to new database concepts.

      Disclaimer: I am a PostgreSQL user.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    25. Re:My guess by Anonymous Coward · · Score: 0

      First, I honestly am repelled by the fanboys who immediately pop up like clockwork whenever MySQL is mentioned and say that it is a piece of crap, and PostgreSQL rocks.

      The times I usually see that happen are when MySQL is being touted as "enterprise ready" or some other term that is inaccurate.

      For what it's worth, as a PostgreSQL user, I see the same thing on the part of MySQL fanboys - except they are usually very ignorant of the issues.

      I have been using MySQL for about four years now, and so I know from personal experience how well it works.

      With all due respect, if you crossed a quiet road for four years without looking both ways, you'd think "hey, works for me". Until you got run over. If you understand the gotchas, then you understand just how fine a line you are walking with them.

      Whether it actually is or not, PostgreSQL *seemed* harder and more complicated.

      With that and your previous "fanboy" comments, you seem to be saying "yeah, PostgreSQL is better, but it has an image problem so I can't be bothered switching". Fair enough. It's what I would characterise as cutting off your nose to spite your face though.

    26. Re:My guess by XemonerdX · · Score: 1

      With all due respect, if you crossed a quiet road for four years without looking both ways, you'd think "hey, works for me". Until you got run over. If you understand the gotchas, then you understand just how fine a line you are walking with them.

      And somehow that argument cannot be applied to PostgreSQL? If so, please explain why...

      I'm not saying MySQL is better than PostgreSQL or vice versa (I lack knowledge to make such an assessment), but I am genuinely interested in why your line of reasoning applies to MySQL but not to PostgreSQL.

    27. Re:My guess by Anonymous Coward · · Score: 0

      And somehow that argument cannot be applied to PostgreSQL? If so, please explain why...

      Because PostgreSQL developers don't have a systematic disregard for data integrity. I know that sounds overly harsh and a bit trollish, but you are aware of the amount and types of MySQL "gotchas" aren't you? Things like silently throwing away referential integrity if it can't use a certain table type instead of throwing an error? And that the MySQL developers consider some of them to be features?

    28. Re:My guess by tcopeland · · Score: 1

      > single tables with over 100 million records

      Sweet. How big is the PGDATA directory? Must be gigabytes.... mine is only 250 MB....

    29. Re:My guess by ahodgson · · Score: 1

      62GB currently. It does like to use disk space. We have a lot of heavily indexed data though.

    30. Re:My guess by tcopeland · · Score: 1

      > 62GB

      Whew!! That's pretty cool. I'll have to remember that next number time a "PostgreSQL for large databases" thread arises...

    31. Re:My guess by ahodgson · · Score: 1

      There are sites with multi-terrabyte PostgreSQL databases. 62GB is nothing compared to them, but certainly the largest I've worked with.

    32. Re:My guess by DittoHead · · Score: 1

      http://sql-info.de/
      http://sql-info.de/mysql/gotc has.html [MySQL gotchas]
      http://sql-info.de/postgresql/postgres-g otchas.htm l [PostgreSQL gotchas]

      The above site has a list of problems and SQL incompatibilities for both PostgreSQL and MySQL. The list for MySQL is quite long, but just looking through the first five examples on the first page will give you a feel for the problems.

      A primary issue is data integrity. Some of the examples in the "MySQL gotchas" show flawed input data being modified by the system when an error should have been returned. That means the resulting data set may not contain the information you expect it to contain.

      One issue with executing queries on a database is knowing when you are getting the correct result. If a query returns 100 records, then it looks like that must be the correct result. But if the query should have returned 150 records, but didn't because the system silently added or modified input data in order to accept some flawed input, then data integrity is lost; you can't trust your database.

      If you're interested in finding out more about database systems, "A First Course in Database Systems" by Ullman and Widom is a pretty good book that is used in college courses. I kept my copy.

    33. Re:My guess by l3v1 · · Score: 0

      So your main argument is, that mySQL is "simple". Well, pretty weak, may I mention. Could've said harsher, but I really don't want to disdain anyone. Thing is, it is "simple" for you so you base your whole argument on mySQL being simpler.

      Whenever I tried looking at PostgreSQL (not recently, see above) it always seemed much more complicated and not as friendly. Well, I have something that has been working very, very well for me for a long while now, so why put myself through all that hassle?

      Again, you say you tried looking at PostgreSQL, and you found it less "friendly". Well, you obiously never tried to configure let's say Oracle9i under linux other than RHEL and let's say compiling PHP with Oracle support.

      Then you also mention the "out-of-the-box" issue. PostgreSQL is perfectly good to use for "simple" tasks and databases without any additional tweaking. Well, "simple" in this case can mean many hundreds of thousands of records as well.

      It's just a fairly relative issue, which you also obviously fail to substantially comprehend.

      --
      I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
  6. Definitive Timothy? by Anonymous Coward · · Score: 0, Troll

    Sadly, the typical book so labeled is a jumble of incomplete ideas crammed together with very little depth.

    Sort of like all of Timothy's articles.

  7. some free books by bcrowell · · Score: 5, Informative

    There are several free SQL books available (one on MySQL, one on SQL in general, and a couple on PostgreSQL; use your browser to search within the text of the page for SQL). User-submitted reviews would be welcome on theassayer.org.

  8. 802 pages...no fluff, huh? by xxxJonBoyxxx · · Score: 0, Flamebait
    The book weighs in at a hefty 802 pages, with very little fluff.

    LOL. MySQL rocks because it just isn't that hard to figure out, or tune, or write efficient code for. What takes 802 pages to explain?

    I'll ask another question. Who still buys non-electronic books in the year 2004? What good is a textbook without a goddamn search function?

    1. Re:802 pages...no fluff, huh? by Anonymous Coward · · Score: 1, Insightful

      For those of us who don't enjoy being chained to a computer. To take a book, sit on a comfortable piece of furniature... or... I know this may be a shock... go outside to read!

      Because large volumes of text are terrible to read on a screen. This is a textbook, not a reference.

    2. Re:802 pages...no fluff, huh? by MC+Negro · · Score: 2, Insightful

      I do. Maybe I'm different, but I certainly prefer ink and paper documentation and books to the e-version. I generally try to read through a book before I begin the "searching", so maybe that's why. When I go to a project, I don't always have an electronic form avalaible. With PDF, Microsoft eReader, Palm Reader and many other formats, it's just easier and more worthwhile to buy a text version. I can't imagine trying to read through the Camel Book or the Sendmail book with an e-version; my eyes would just start burning from looking at a screen that long.

      Oh yeah, and I like to support publishers like O'Reilly, who consistently deliver top-notch books that are almost always worth my money.

      --
      "You and your third dimension."
    3. Re:802 pages...no fluff, huh? by plastik55 · · Score: 1

      Hm. I typically have three or four binders open on my desk with various printed documentation in them. Screen real estate is too valuable to dedicate to documentation--having to continually flip between development and reference really slows me down.

      While it may be wasteful of paper, I'm sticking with the binders until there is a display that (a) is as big as my desk (b) has 600 dpi effective resolution for easy reading (c) I can convince my employer to buy.

      Anyway, paper books have a perfectly servicable search function, accessed by opening to the back pages of the book and locating the desired search terms, then reading the referenced page number.

      --

      I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!

    4. Re:802 pages...no fluff, huh? by ChiefHappyWind · · Score: 1

      Who still buys non-electronic books in the year 2004?
      I like books for when the wife says, "Get off that computer and come watch TV with me." See, she's the boss. I hate TV. At least i can read a book, and i only read technical books. She just wants proximity, so i can read while she watches TV.

      --
      There are 10 types of people in the world... those that understand binary and those that don't.
    5. Re:802 pages...no fluff, huh? by emjoi_gently · · Score: 2, Funny

      "What good is a textbook without a goddamn search function?" It's called the Index.

    6. Re:802 pages...no fluff, huh? by Short+Circuit · · Score: 1

      Unfortunately, some books have horrible indeces.

      Because I don't have a lot of room for books, and because I would need them both at and away from home, I like to use O'Reilly's Safari service. $10/mo to rent up to 5 books at a time and read them with any web browser. (That's the low-end package.)

    7. Re:802 pages...no fluff, huh? by Bigbutt · · Score: 3, Interesting

      I do.

      1. No power requirements. I can sit out back or take a ride into the mountains and read.
      2. No computer distractions. When I'm on the computer, I'm doing computer stuff. Not reading.
      3. Ergonomically better. I can "curl up and read a good book". Tough to do with a computer (note I said "Tough", not impossible).
      4. Search = Table of Contents or Index and I might find something else helpful while looking.
      5. I can bring it with me to work and not have to worry about losing a multi-hundred or even thousand dollar e-book because of some light fingered stooge.
      6. I can carry it on my motorcycle and if it gets wet it'll dry out with minimal ill effects.
      7. I can leave it in the car and not worry about the screen freezing or the system getting overheated and frying.
      8. I like the feel of a good book.
      9. O'Reilly rocks.

      Yea, I've got a few books at home. http://www.schelin.org/stuff/computer/index.html

      [John]

      --
      Shit better not happen!
    8. Re:802 pages...no fluff, huh? by Anonymous Coward · · Score: 0

      That's a nice tax deduction.

    9. Re:802 pages...no fluff, huh? by Bigbutt · · Score: 1

      They've been bought over the past 7 or so years when I first begin as a Unix admin. The team lead pointed me to Essential System Administration. I had a small handful prior to that introduction, mostly programming books.

      --
      Shit better not happen!
  9. This book's so good, by nil5 · · Score: 0

    myself and others are already awaiting the sequel

  10. +2 Saving Throw vs. Obscure and Nerdy References by PCM2 · · Score: 1, Funny
    My guess is that MySQL will decline now that PHP uses SQLite, and that PostgreSQL has so much more speed, stamina, strength and beauty.

    Now where's the Intelligence and Wisdom in that?
    --
    Breakfast served all day!
  11. the answer by Anonymous Coward · · Score: 0

    the answer to that question will be revealed in the 3rd edition.

  12. Answer by base_chakra · · Score: 2, Insightful

    Does anyone today look at the available technologies, and actually choose MySQL over PostgreSQL? I mean, assuming they aren't already using any database, and they don't have any requirements that would force them to MySQL (like a PHB saying, "But I've HEARD of MySQL! What's this Postgres crap?")... why would anyone choose MySQL?

    This has come up more than once in previous discussions. Reasons include: web hosts not supporting PostgreSQL, technology unfamiliarity with ORDBMS's relative scarcity of graphical PostgreSQL clients, and (the illusion of) a bigger grassroots support base for MySQL, to name a few.

    Anyway, why wasn't parent modded Off Topic?

  13. MySQL much cleaner than Postgres IMHO by Anonymous Coward · · Score: 0

    IMHO, MySQL is much cleaner and easier to deal with than Postgres, but only if you aren't using transactions and stick to the MyISAM tables.

    Personally I still use it to run a large complex site with thousands of users and it performs flawlessly, and quickly, day in and day out. Last time I checked, my most difficult queries still ran faster than on Postgress, so why would I change?

    New Web Cartoon: Jendini.com

    1. Re:MySQL much cleaner than Postgres IMHO by davegaramond · · Score: 1

      Please define "clean".

      If you mean source code readability, people have said that MySQL's C++ source code is very obfuscated and hard to read, while the Postgres' C source code are pretty well organized.

      If you mean SQL, they're basically the same, but MySQL has some shortcuts like INSERT IGNORE, REPLACE INTO, not requiring "AS" in column/table aliases, etc. But I don't see why this would be regarded as being "cleaner". Not standard-compliance, that's what it is.

      If you mean the app code, why are apps using MySQL cleaner than the ones using PostgreSQL? The API are basically similar (connect, query, etc). Plus if you use a DB abstraction layer (like DBI in Perl), the distinction is even smaller.

      So what do you mean by "cleaner" anyway??? "Not using transactions" is cleaner? (Shudder).

  14. I am going to go with... by jqcoffey · · Score: 4, Informative
    Who still buys non-electronic books in the year 2004?

    ...people who still like paper books?

    What good is a textbook without a goddamn search function?

    You have heard of an "index" correct?

  15. You can use MySQL on the internets by sammykrupa · · Score: 0

    You can use MySQL on the internets! Wow, technology really is moving forward!

  16. ISBN? by glass_window · · Score: 5, Informative

    They should be required to post the ISBN number with the review. In case you're wondering, it's 1590591445.

    1. Re:ISBN? by r.jimenezz · · Score: 1
      They should be required to post the ISBN number with the review

      It is part of the standard review header.

      --
      The revolution will not be televised.
  17. Yes. by Anonymous Coward · · Score: 0

    And occassionally, the fact that MySQL is a single-file database is more advantageous than the ability to do fancy selects.

    PostgeSQL rarely breaks but, the fact is that sooner or later all databases do break. When that happens, the single-file dtabases are much easier to deal with. You may not be able to recover without resorting to tape but, the time spent before making that decision will be far less with MySQL.

  18. Obligitory MySQL Gotcha by LadyLucky · · Score: 4, Informative
    --
    dominionrd.blogspot.com - Restaurants on
    1. Re:Obligitory MySQL Gotcha by Squeebee · · Score: 1

      Actually, the MySQL team uses that (outdated) list as one source for ideas on things to work on for future versions, it's much appreciated!

    2. Re:Obligitory MySQL Gotcha by Tablizer · · Score: 2, Insightful

      Note that every RDBMS has gotcha's.

    3. Re:Obligitory MySQL Gotcha by sql-gotcha · · Score: 2, Interesting

      Hey, thanks!

      Seriously though - if you find anything outdated (or just plain wrong) in the list, please tell me about it and I'll post updates. FWIW I gave it the once-over when 4.1 was certified as stable a few weeks back, but I may have missed something.

      Disclaimer: despite appearances I do actually work with MySQL databases, and I'd be more than happy to see that list get smaller.

    4. Re:Obligitory MySQL Gotcha by Bitsy+Boffin · · Score: 1

      The next link on this page drops you into the postgres gotchas...

      http://sql-info.de/mysql/transaction-innodb-tabl e. html

      --
      NZ Electronics Enthusiasts: Check out my Trade Me Listings
    5. Re:Obligitory MySQL Gotcha by Squeebee · · Score: 1

      My accusation of outdatedness has to do with the delay in recognising fixes until a version is declared production, and has less to do with your list than with the fanboys who point to it then take pride in the native Windows Postgres build that is not in production. You may want to take a look at the TRADITIONAL mode, as seen in http://dev.mysql.com/doc/mysql/en/Server_SQL_mode. html When MySQL 5 goes production, this will knock a few items from your list, as it causes errors instead of warnings on bad data. It looks like you are pretty up-to-date with your list now with 4.1 actually, and I will give it a once-over for your later just to be sure. If you want to email me your email address, I can provide feedback more directly. I will note that the administration link is broken, and takes me to the PostGres administration gotchas.

    6. Re:Obligitory MySQL Gotcha by LizardKing · · Score: 2, Interesting

      Note that every RDBMS has gotcha's.

      Yup, but no database I've used has as many gotchas as MySQL. Recently I have been bitten by the following ones:

      • MySQL accepts invalid dates
      • MySQL doesn't support a BOOLEAN type
      • MySQL regularily corrupts tables if a JDBC connection dies during a write
      • The default table type (the one I'm stuck with thanks to company politics) doesn't support referential integrity or transactions

      MySQL was chosen by my predecessors because it was the only free database they'd heard of. They did no research and no serious consideration of what they really required, otherwise they would have chosen a database that at least supported foreign keys (they chose MySQL before version 4 appeared).

    7. Re:Obligitory MySQL Gotcha by Anonymous Coward · · Score: 0

      Note that most RDBMSs don't have data integrity gotchas.

  19. Re:+2 Saving Throw vs. Obscure and Nerdy Reference by Bigbutt · · Score: 1

    I dunno, which one used speed, stamina, strength, beauty, intelligence and wisdom?

    Strength, intelligence, wisdom, dexterity, constitution and charisma yea. Speed might be a subtable of strength, dexterity and constitution. Beauty is but one aspect of charisma. Stamina might derive from constitution.

    [John]
    "Chaotic Dungeon Master and the Laws are Random"

    --
    Shit better not happen!
  20. It's the director's cut... by Saeed+al-Sahaf · · Score: 2, Funny

    It's the director's cut with added chapters and interviews with the editorial staff on how they brought it all together, all on 3 bonus CDs.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  21. Re:+2 Saving Throw vs. Obscure and Nerdy Reference by OblongPlatypus · · Score: 1

    Strength? Dexterity? Bah. I want to know which database has the most Spirit. And what about those all-important Possibility Points?

    Ok, you caught me, I'm trying to out-do the grandparent in obscurity of reference.

    --
    -- If no truths are spoken then no lies can hide --
  22. Boring by DogDude · · Score: 1, Informative

    Interesting. Is there any theory on why mysql is popular to web hosts?

    Simple. Plain old web server admins rarely know anything about databases. Anybody who knows how "real" databases work is gainfully employed at a lucrative job, not rebooting Linux boxes that host "About Me" web pages. Out of the whole dot-bomb debacle, the only people I know that are still employed (and still paid very well) are Oracle DBA's. They couldn't give two shits about dinky web servers when they're massaging terabytes of data on massive Sun boxes. I was a Oracle developer in a past life, and quite honestly, I couldn't bring myself to care about web stuff when I could be spending my time writing some kickass, recursive SQL that did fun things like migrate a US state's Medicare records (5 terabytes worth) from flat files from the green screens into Oracle. The web stuff was always given to "the new kid" to handle. And suffice to say, "the new kid" wouldn't know a database from a banana (and thought that MySQL was a database).

    --
    I don't respond to AC's.
  23. Rehashed up! by nighty5 · · Score: 1

    Is it just me or is everyone over the re-hashed books on anything technology specific....

    I started off using mySQL years ago but in the past 12 months migrated everything to PostgreSQL. I picked up a book on PGSQL just to see what im missing out on and could not justify the cost. (books in Australia are very expensive: $USD70 for the average book in oz).

    I think books are great to get your started to know something like SQL but hardly worth buying every revision...or technology...

    Especially when most of these bibles are 200 pages of APIs.

  24. Agreed. by Aldric · · Score: 3, Insightful

    MySQL is an excellent database server, as is Postgre. Maybe the fanboys should find something better to do with their time than hanging around Slashdot complaining about the database some other people use?

  25. I'm waiting for the third edition by Anonymous Coward · · Score: 0

    cause I'm really looking for the *Definitive* one.

  26. 800 pages? by Tablizer · · Score: 1

    Any technology that takes 800 pages to explain perhaps needs to be reworked. RDBMS seem to keep adding obscure features to lock customers in to their product. MySql seems to be following this trend either to do the same thing or out of RDBMS copycat habit.

    Rather than pull an Oracle, I would like to see a RDBMS that tries to use simple concepts, including perhaps a new simple relational language besides SQL[1]. It would get its power from custom add-ons and hooks, not by trying to be everything to everybody out of the box.

    [1] However, we are probably stuck with SQL as the "standard" for a while.

    1. Re:800 pages? by Decaff · · Score: 1

      RDBMS seem to be adding obscure features

      MySQL has taken a long time to acquire even standard SQL features, let alone obscure ones. (Version 4.1 is a huge improvement).

      I would like to see a RDBMS that tries to use simple concepts, including perhaps a new simple relational language besides SQL[1]. It would get its power from custom add-ons and hooks, not by trying to be everything to everybody out of the box.

      The concepts behind RDBMSes are simple - that is why they are so widely used. What is complex is the ways that these concepts can be combined and used. If you devised an SQL replacement it would soon look just as just as sophisticated. Adding custom extras is a quick way to make the replacement language even less portable (and so less useful) than SQL!

    2. Re:800 pages? by Tablizer · · Score: 1

      MySQL has taken a long time to acquire even standard SQL features, let alone obscure ones. (Version 4.1 is a huge improvement).

      Perhaps their priorities could be tuned in some areas.

      If you devised an SQL replacement it would soon look just as just as sophisticated.

      I disagree. SQL syntax is ugly by almost any standard there is. Its syntax "tree" is lot like COBOL in style. Compare the syntax of COBOL to say C, TCL, Lisp, etc. It is at least an order of a magnitude more complex. And, it lacks reference composability (at least in the standard), which contributes to its complexity because it has to make up for it in other ways.

      And, I would probably go with table-based data definition "language" approach rather than a text syntax-based approach.

    3. Re:800 pages? by Anonymous Coward · · Score: 1, Informative

      Google for "Tutorial D" .. that's a replacement language by C. J. Date and others based on set theory rather than..whatever SQL is based on ..

      Actually, you should read all the stuff on their site (www.dbdebunk.com) to see just what a sad state the DB industry is in right now.

      Anyway, here's a taste of how Tutorial D makes things simpler.

      In SQL if you want a set of all tuples in a relation, you type: "SELECT * FROM Relation". In a Tutorial D-like language you type just: "Relation".

      If you want to extend the tuples with a new variable, in SQL you type "SELECT *, ColA+ColB AS Total FROM Relation". In Tutorial D you type "Relation EXTEND ColA+ColB AS Total.

      Tutorial D is declarative, like writing a math equation.

      SQL sucks so bad, it hurts.

    4. Re:800 pages? by Tablizer · · Score: 1

      Google for "Tutorial D" .. that's a replacement language by C. J. Date and others based on set theory rather than..whatever SQL is based on ..

      Here is a draft of my pet relational language:

      http://www.c2.com/cgi/wiki?TopsQueryLanguage

      Tutorial D mixes infix and prefix table operators, which bothers me a bit.

    5. Re:800 pages? by Decaff · · Score: 1

      I disagree. SQL syntax is ugly by almost any standard there is. Its syntax "tree" is lot like COBOL in style. Compare the syntax of COBOL to say C, TCL, Lisp, etc. It is at least an order of a magnitude more complex. And, it lacks reference composability (at least in the standard), which contributes to its complexity because it has to make up for it in other ways.

      I would not say that the syntax is an order of magnitude more complex, but I see what you are saying. My point is that SQL expresses a lot, and any replacement language would have to express just as much, even if it substituted the syntax of SQL for some other (more elegant) notation.

  27. Wow. by boodaman · · Score: 3, Insightful

    I have a doppelganger, and it is you. I was just about to type the same thing!

    Well said.

    I've been using MySQL for 5 years. It just works, it has handled load very well with default configurations, it is easy to install, and client support is very strong. For example, I admin all of my MySQL servers from a Windows desktop at work. All free, all without problems, very stable.

    We looked at PostgreSQL...for our purposes it would have been like using a sledgehammer on a tack. Does that mean we don't have any "real databases"? Maybe so, but our revenue is growing like crazy and our systems have more than enough capacity and stability to handle it. Any software that helps us make money like that without any problems is real in my book.

  28. The Definitive Guide to MySQL for ADD Programmers by Garridan · · Score: 1

    Here's the full text:

    MySQL roXorZ!!!

  29. O'Reilly by gaiscioch · · Score: 1

    Whenever I start a new CS topic, the first thing I do is go get the relevant O'Reilly books. They're just so easy to read and find whatever information you need. And while they may not be 'Definitive' or 'Ultimate', I think that, ultimately, they're the best way to begin.

  30. Mod parent up! (Re:My guess) by imroy · · Score: 1

    Yes, exactly. I must admit I am somewhat of a fanboy. I don't "pop up" like the grandparent post described, but I do come to these MySQL stories specifically looking for PostgreSQL comments. And sometimes I post, like now. But I don't go looking to troll or anything, just trying to advocate a great piece of software that I think gets far too little attention.

    It's not unique to PostgreSQL. Any time people discover a great alternative to a well-known mainstream product, those people will use any forum to promote it. You might have heard of a thing called Linux. Do you really think you would have heard of Linux if you only paid attention to vendor ads and press releases?

  31. *yawn* by Anonymous Coward · · Score: 0

    The Definitive Guide to STFU!

  32. Any other suggestions for MySQL reference book? by Flambergius · · Score: 1

    I'm going to buy one or more books on MySQL and related subjects (the LAMP-stack). I usually go with the newest O'Reilly book on the subject (any subject), but the reviewed book seems interesting. 10/10 from a Slashdot review and no serious arguments from the masses, that is pretty good recommentation.

    My questions are:

    If you have read/used this book, is it really that good?
    If you have not read/used this book, what book have you read/used and found satisfactory as a desktop reference book.

    --Flam

    --
    Computers are useless. They can only give you answers - Pablo Picasso
    1. Re:Any other suggestions for MySQL reference book? by chicagoan · · Score: 1

      I was just looking into getting this book but what makes me nervous is that it was published in October of 2003 and 4.1 wasn't even feature frozen at that time so how can it effectively discuss 4.1?

  33. Mod Parent back Up! by Anonymous Coward · · Score: 0

    That was right on the money!

  34. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  35. Re:Book is cheaper here by Anonymous Coward · · Score: 0

    You forgot to add "and make me some money!"

    Affiliate link in post. Mod Amazon money spammer down.

  36. What postgresql fanatics should do: by bani · · Score: 1

    Instead of whining about how "mysql sux0rz, postgresql r0x0rz", you should be asking yourself why mysql is dominant over postgresql.

    If postgresql is so superior, why hasnt it been able to get any significant market share?

    Why does mysql dominate webhosting?

    Why are huge sites with hundreds or thousands of transactions/sec successfully using mysql without any problems? postgresql fanatics claim such sites simply cant exist because mysql can't handle "those kinds of loads".

    Solve those questions and maybe postgresql will become more widely used.

    This all reminds me of the "(free|net|open)bsd r0x0rz, linux sux0rz" fanatics, and nothing makes people tune you out faster than ranting on like a religious fundamentalist.

    Instead of whining, address the issues.