Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

The Definitive Guide to MySQL 5

samzenpus posted more than 8 years ago | from the all-in-one dept.

Programming 100

jsuda writes "The Definitive Guide to MYSQL 3rd Edition certainly deserves its title. It is a large, dense, complete guide to MySQL and updates its predecessor edition by covering new MySQL5 and new auxiliary software including database administration tools and interfaces. MySQL is the open-source database software which has become very popular for web-based database applications now being used by Yahoo, NASA, Slashdot, and other entities. Read on for the rest of Jsudas' review

The author of this book, Michael Kofler, has a Ph.D. degree in computer science and is an accomplished writer of technical books. The audience is intermediate to high-level database designers and programmers. Although the presentation assumes little prior knowledge of MySQL and databases, it does assume a good amount of contact with and knowledge of programming languages. The topic of this book does not lend itself to an easy, flowing writing style. Reading through this complex material is like chewing on heavy New England pound cake. That is not a criticism of the author as he thoroughly presents the topics in a comprehensive, workmanlike, textbook-like manner. The discussions of databases and MySQL features are lightened by numerous table, charts, graphics, and examples of relevant matters.

The updating from the 2nd Edition of The Definitive Guide involves the upgrade of MySQL from version 4.1 to 5.0 which now provides support for Unicode, the sub-SELECT and GIS functions, improved authorization features, addition of stored procedures, and other new commands and server options. It also includes discussion of new or updated auxiliary software used with MySQL, like PHPAdmin and new interfaces for Open Office, Star Office, and Apo.NET.

There are six parts with twenty-three chapters and 3 appendices, amounting to 748 pages with index. The parts entail an introduction to MySQL and databases, administrative tools and user interfaces, fundamentals of database design, programming using MySQL, and detailed content references. The appendices include short segments of a glossary, bibliography, and notes about the sample code files available for downloading from the publisher's website at http://www.apress.com./

The beginning chapters introduce the basic concepts of MySQL including its client-server architecture, tables, fields, queries, keys, and the distinction between relational and object-oriented databases. The author focuses the bulk of the book on relational databases. The many features of MySQL are itemized and other matters like licensing and setting up test environments are discussed. A large segment of this early material offers instruction on installing under Windows and Unix/Linux platforms and configuring the installations for function, usability, and security. An introductory example of building an opinion poll application with PHP is provided.

Chapters 4 - 6 cover a number of administrative tools to use with MySQL, including mysqladmin, mysqldump, and PHPAdmin. The author spells out how to install and configure, set up user management and security, create and edit databases, import and export data, and use auxiliary functions, among other things.

The best chapter, in my view, is Chapter 8 on database design. The technical aspects of databases are well-covered, like the various table types and data types, but the more theoretical aspects are noted in some length. There is some art in creating databases and tables which is above the technological. Correct design with related tables is crucial to efficiency, ease of use, accuracy, ability to revise, and consistency. A segment on "tips and tricks" in database design is especially interesting.

The bulk of Part 3 contains a comprehensive presentation of SQL features, syntax, configuration, and security issues, The new functions of version 5 are explored, like GIS and stored procedures and triggers. A section on transactions for advanced users and setups is nicely done. For novice users, mention is made of the "--I-am-a-dummy" option which warns and provides a second chance to avoid inadvertent updating or deleting of a table. Chapter 14 is all about maintenance issues - backing up, importing, logging, and replication.

Part 4 deals with how to combine MySQL with programming languages like PHP, perl, Java, C, Visual Basic, and Visual Basic.NET. Each is treated similarly - detailing features, concepts, syntax, and programming techniques. Most of the attention is given to PHP, which is described as a natural companion to MySQL for use in developing dynamic web applications.

Chapter 21 is a comprehensive SQL reference of operations, functions, data types, variables and constants, and commands. There are a large number of charts and tables to bring order to the dense material. Chapter 23 contains material on the various API's which can interact with MySQL. These include PHP.API, perl.API, JDBC, ADO-net, and C.API.

For those with a need to know, and those with a desire to learn MySQL, this volume contains nearly everything you would want and expect, not only about MySQL itself but about the software that interacts with it or web servers. The author deserves credit for presenting the dense material in a thorough and orderly manner."


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

Sorry! There are no comments related to the filter you selected.

Feline Poop! (-1, Troll)

Anonymous Coward | more than 8 years ago | (#13917332)

Fuck you, all of you motherfucking LambdaMOOers, you! That's right, fuck y'all!

Does this mean... (3, Interesting)

Trolling4Columbine (679367) | more than 8 years ago | (#13917336)

...that the first and second editions weren't all that definative?

The problem with buying "new and improved" is the revelation that all along you'd been using "old and inverior".

Not sure how definitive (1)

Sqwubbsy (723014) | more than 8 years ago | (#13917364)

Doesn't look like there's anything on ODBC.

Re:Does this mean... (2, Insightful)

MindStalker (22827) | more than 8 years ago | (#13917509)

Well in this one case its accurate, MYSQL 5 includes many new features that wern't included in MYSQL 4.x. So while the definative guide on MYSQL 4.x might have been definative concerning 4.x it is inferior when it comes to dealing with 5.

They were definitive at the time. (1)

CyricZ (887944) | more than 8 years ago | (#13917537)

MySQL 5 is a new product, and vastly different/improved from earlier releases of MySQL. So yes, the previous "The Definitive Guide to MySQL" books were definitive for the earlier MySQL releases.

And yes, the old books may be considered "inferior" when you're working with MySQL 5, just because it is new software and the older books thus do not cover it.

Re:They were definitive at the time. (0)

Anonymous Coward | more than 8 years ago | (#13917606)

Yes but does it provide the much needed crack, to you know, crackwhores such as yourself?

Re:Does this mean... (1)

ccmay (116316) | more than 8 years ago | (#13927538)

The problem with buying "new and improved" is the revelation that all along you'd been using "old and inverior".

No no no. You obviously don't understand marketing speak. If something is "new and improved", it means the old one was "original", "classic", or "tried-and true".

-ccm

Eh? (2, Insightful)

Legendof_Pedro (900265) | more than 8 years ago | (#13917338)

The Definitive Guide? And I thought the online documentation [mysql.com] ...

that's the truth (4, Insightful)

conJunk (779958) | more than 8 years ago | (#13917444)

The Definitive Guide? And I thought the online documentation...

totally... i was wandering in my favorite geek bookstore [powells.com] yesterday... it's weird to look at the shelves, at the rows and rows of thick, expensive books, and think... "i've had no trouble with the online help for that one, and that one, and that one..."

people will spend money on just about anything... but, in fairness, it can be nice to have a guide that you can flip through some times... i don't like online doucmentation for everything but it has its place... a lot of these books though seem a bit much

For me, not so much. (2, Informative)

TheSpoom (715771) | more than 8 years ago | (#13917497)

Five years ago, when I first learned PHP, I needed a tutorial-style book to help me along. Granted, the PHP documentation is AWESOME as a reference, especially considering there are functions for practically anything you can think of. However, I can definitely say that having a book that went through the basics first in a style where one could easily learn the language from scratch helped me out a lot.

(If anyone's trying to learn PHP, by the way, I highly recommend Sams' Teach Yourself PHP In 24 Hours. If you don't feel like buying a book, you could also check out the PHP Wikibook [wikibooks.org] [Disclaimer: I have added parts.])

Re:For me, not so much. (0)

Anonymous Coward | more than 8 years ago | (#13917638)

If anyone's trying to learn PHP, by the way, I highly recommend Java. Or at least PERL. hee hee hee.

Re:For me, not so much. (1)

CyricZ (887944) | more than 8 years ago | (#13917785)

I agree with your sentiments that PHP is an unsuitable language for web development. The security risks are often far too great, and as a language it does not promote good programming habits. Indeed, it should be avoided by most programmers.

Thankfully, however, we have better technology to replace Java and Perl. Ruby and Python have shown themselves to be true contenders in this area. They offer all of the benefits of PHP, but without many of the negative aspects of PHP. Plus they are far more mature and powerful languages, on the whole.

Re:For me, not so much. (1)

mporcheron (897755) | more than 8 years ago | (#13917938)

PHP is a highly secure language - it's just that too many morons are attempting to learn it which in turn means that create dodgy scripts which have more holes in them than a colander which has been shot 1000 times at close range.

An example of an overly poor script which I come across far too many times is:

main stuff here

However any person with common sense can pick out many problems in this (for example: use ' instead of " to save processing time, there are many more).

Re:For me, not so much. (1)

mporcheron (897755) | more than 8 years ago | (#13917972)

Should have checked the preview more closely, the example was meant to be:

<? include ("header.php"); ?>
<? include ("menu.php"); ?>
main stuff here
<? include ("footer.php"); ?>

Re:For me, not so much. (1)

fatboy (6851) | more than 8 years ago | (#13918005)

What's wrong with that? (So long as header,menu and footer do not expose anything if called by themselves.)

Re:For me, not so much. (0, Troll)

CyricZ (887944) | more than 8 years ago | (#13918008)

If it were truly secure, then it would be basically impossible for those "morons" to write unsafe scripts. Considering it is mostly used by people without much experience, the PHP developers should put forth far more effort towards making it immune to such common mistakes.

Indeed, even those with much experience have run into may problems with PHP. Take the Drupal and PHP-Nuke developers running into so many problems, for instance.

Like it or not, PHP just isn't suitable for anything remotely important. It's good for adding the current date and time to documents, but I would never trust it for anything beyond that.

Re:For me, not so much. (0)

Anonymous Coward | more than 8 years ago | (#13918150)

Another thing is that screen resolution on computing devices just isn't there yet- while the online materials are handy for short lookups, human brains just don't absorb materials from them quite as well.

Re:that's the truth (1)

drinkypoo (153816) | more than 8 years ago | (#13917590)

Printed books are good for reading in the bathroom. Maybe if I had a nice lightweight tablet I'd just read the digital stuff there but my laptop is an IBM that weighs like 57890235907 pounds...

Re:Eh? (2, Interesting)

Overly Critical Guy (663429) | more than 8 years ago | (#13918472)

Well, given that MySQL's online documentation in the past claimed that you didn't need transactions and triggers and that you were better off without them, I don't blame people for looking elsewhere for docs.

Re:Eh? (2, Informative)

CoolBru (798217) | more than 8 years ago | (#13919435)

I'm really not that keen on the MySQL online docs - they are nowhere near as good as the PHP docs (especially the user notes), and there's a lot that's undocumented (seems to be much I search for). For example, where can you find out about logging warnings? I'd hope that a definitive guide was quite a bit better than the online docs.

The Definitive Guid to MySQL 5: (-1, Troll)

Anonymous Coward | more than 8 years ago | (#13917340)

Get a Real Database

MySQL hatred thread (5, Funny)

Anonymous Coward | more than 8 years ago | (#13917352)

Please put all of your stupid, self-important comments about how MySQL sucks, isn't a real database, etc., in this thread so the rest of us can easily ignore them. Thanks.

Re:MySQL hatred thread (-1, Troll)

ylikone (589264) | more than 8 years ago | (#13917468)

I'll start. MySQL loves SCO and is in bed with them!! Boycott MySQL! Use PostgreSQL.

Re:MySQL hatred thread (2, Funny)

Anonymous Coward | more than 8 years ago | (#13917593)

Oh no you don't, mysql guy. Your favorite database isn't immune.
You'll take your flames like every one here.

BTW, BSD is dying, vi is better than emacs, open office is bloated, linux only has one game called tuxracer, and memory managed programming languages are slow.

Re:MySQL hatred thread (0)

Anonymous Coward | more than 8 years ago | (#13917626)

Mod parent up FUNNY!

BTW, MySQL sucxz0rz

Re:MySQL hatred thread (1)

rabeldable (851423) | more than 8 years ago | (#13917627)

BTW, BSD is dying, vi is better than emacs, open off....


you forgot one.....


Linux, the OS you never have to reboot! unless you have a driver problem, or you reconfigure your kernel, or you have a hardware problem with CPU, disk or memory...

ok, you don't have to reboot if you change your IP!

Re:MySQL hatred thread (0)

Anonymous Coward | more than 8 years ago | (#13917750)

BTW, BSD is dying, vi is better than emacs [...]

are you trying to subtly imply that vi ('incidentally' a link to vim) is *not* better than emacs?
/thread hijacking attempt

Re:MySQL hatred thread (1)

Donald Ferrone (863523) | more than 8 years ago | (#13963933)

BSD is dying, vi is better than emacs, open office is bloated, linux only has one game called tuxracer, and memory managed programming languages are slow.

Well and good, but which one is the lie?

Re:MySQL hatred thread (1)

PietjeJantje (917584) | more than 8 years ago | (#13919405)

I make boring backends for a bank using Oracle based systems costing 1 zillion dolars with an even more expensive support contract because the PHB was awed by Oracle sales persons, yada yada yada so all webdevelopers shouldn't use a free database perfectly suited for them.

Re:MySQL hatred thread (0, Flamebait)

Anonymous Coward | more than 8 years ago | (#13919621)

so the rest of us can easily ignore them

Yeah, that's the problem, IGNORANCE.

Most of you MySQL apologists couldn't even *define* what a DBMS is, so how could you determine if MySQL is one or not?

Now, usually I don't mind other people being ignorant. But the state of data management today is so mind-numbingly pathetic and primitive, sometimes I feel I have to speak up, just so I can hopefully find one or two products someday that do what I need.

Why do you think MySQL 5.0 has all these new features? That's right, because people who know a thing or two about data management DEMANDED them. The roadmap for a powerful, general-purpose database was laid out DECADES ago, and no product on the market today even comes close. Since MySQL is even *less* capable than the average database product, it's gonna get picked on.

Ahem. (-1, Flamebait)

Anonymous Coward | more than 8 years ago | (#13917358)

Chapter the First: In case you bought this book in error: full refund instructions.
Chapter the Second: In case you thought MySQL was a real database: PostgreSQL installation instructions.
Chapter the Third: Installing MySQL...

I'll read it, then what? (0, Troll)

deep_zeus (926001) | more than 8 years ago | (#13917379)

Great, I'll read it, become proficient in it. Then wait for the hosting companies to migrate to mysql5 in the next year or two so I can implement something that won't break for clients.

Re:I'll read it, then what? (1)

Phillup (317168) | more than 8 years ago | (#13918538)

Real clients have their own servers.

Intermediate level? (5, Insightful)

webmosher (322834) | more than 8 years ago | (#13917455)

It bothers me a bit that the reviewer considered the content intermediate to advanced, yet found the database design chapter most informative. Design in my opinion should be mostly irrelavent to the database its implemented on. Sure, you can optimize certain aspects of a design based on the features of the database server, but this should not define the design. Design should be a study in itself and not something thrown in for the sake of completeness.

However, considering the average DB design skillz of a commonplace/low-rent PHP developer (or at least the ones I have had to clean up after). I am hopeful that more developers using PHP/MySQL will actually take the time to look at the content in this or other definitive books on MySQL.

Re:Intermediate level? (1)

conJunk (779958) | more than 8 years ago | (#13917499)

It bothers me a bit that the reviewer considered the content intermediate to advanced, yet found the database design chapter most informative. Design in my opinion should be mostly irrelavent to the database its implemented on.

can't both possibilities be true? why can't the book be geared toward an intermediate/advanced mysql user in terms of assumed skillset, features covered, etc., but also include a really good chapter on db design?

Re:Intermediate level? (2, Insightful)

brunson (91995) | more than 8 years ago | (#13918715)

My concern is that a "Definitive Guide", especially one geared towards an intermediate/advanced user would not include a section on clustering, one of the most advanced and important additions to version 5.

Re:Intermediate level? (4, Funny)

digidave (259925) | more than 8 years ago | (#13917511)

Ya especially for a database with such bad design. MySQL can't even nest tables like HTML can, so I think I'll stick with HTML until MySQL improves a lot. Besides, with CSS you can make HTML look great, but last time I looked at MySQL it was just weird blue with some sailboat in the corner and you couldn't change it.

Re:Intermediate level? (1)

digidave (259925) | more than 8 years ago | (#13917828)

I suspect the person who moderated me 'Troll' has not yet organized his brain into 1NF.

Re:Intermediate level? (0, Redundant)

mporcheron (897755) | more than 8 years ago | (#13917845)

Firstly, what you are referring to in 'blue with some sailboat' is phpMyAdmin, which is not MySQL, phpMyAdmin is a PHP script created to help administer MySQL databases/tables etc. without using a command line based program thus is popular among web hosts. MySQL tables can be accessed numerous ways through PHP.

Secondly MySQL is a database and doesn't need a website to run, MySQL is a program aimed at storing information and making it accessible through queries.

Thirdly, why you even bothered to comment on such an issue when you quite clearly do not understand the difference between a markup language, a programming language and cascading style sheets.

Re:Intermediate level? (1)

allanw (842185) | more than 8 years ago | (#13918221)

I think you and the people marking him down missed the joke.

Re:Intermediate level? (1)

mporcheron (897755) | more than 8 years ago | (#13918315)

my bad, i'd already started typing my comment when he posted again.

Re:Intermediate level? (0)

Anonymous Coward | more than 8 years ago | (#13919569)

1. I've used MySQL for years.

2. I've written several books about MySQL.

3. I work for MySQL AB.

4. I think I'm qualified to say: Parent is funny as hell, please mod up. :)

5. No mod points currently, or I'd do so myself. :(

Re:Intermediate level? (1)

Sunkist (468741) | more than 8 years ago | (#13917565)

However, considering the average DB design skillz of a commonplace/low-rent PHP developer (or at least the ones I have had to clean up after).

you now believe that the database design chapter was relative? you'd place money on the chapter helping civilization? you can see how someone would be so bothered to include a chapter on database design.

Oh, you cursed and incomplete sentence! We shall never know your true meaning.

Then get a book on database design. (1)

CyricZ (887944) | more than 8 years ago | (#13917662)

Like this book states in its title, it focuses on MySQL. It shouldn't waste pages dealing with general database design, since that's not what it's about. If you're interested in database design, then get a book on that instead.

I wouldn't expect a book about using C++Builder to delve into designing C++ programs using common patterns, for instance. It's supposed to be about C++Builder, rather than designing C++ programs.

Re:Then get a book on database design. (2, Insightful)

sco08y (615665) | more than 8 years ago | (#13917791)

Like this book states in its title, it focuses on MySQL.

It also claims to be the definitive guide. If something is definitive, it's got to be complete. You can't properly use a SQL DBMS without understanding the principles of the SQL language.

This is especially true since MySQL takes liberties with the SQL standard which already diverges widely from the relational model.

It's specifically about MySQL. (1)

CyricZ (887944) | more than 8 years ago | (#13917857)

Indeed, it is definitive. It is definitive with regards to MySQL. MySQL is an SQL implementation, with its own set of extensions. It is perfectly acceptable for it to be called definitive and only focus on MySQL, just because it is a book about using MySQL. It's not a book about database design, or about the SQL language.

Again, it isn't the "Definitive Guide to SQL" or the "Definitive Guide to Relational Database Design". It's supposed to focus on specifically on MySQL itself, rather than more general SQL and database design issues. You're supposed to get more specific books on those topics if you're truly interested.

I would not expect a book about using C++Builder or Microsoft Visual C++ (two implementations of C++) to spend much time on the C++ language itself. They're books about using the implementation, not about using the language.

Re:It's specifically about MySQL. (1)

BarryNorton (778694) | more than 8 years ago | (#13918341)

MySQL is an SQL implementation, with its own set of extensions
Worse - unless things have changed it's an incomplete SQL (even SQL92) implementation.

Consequently, it certainly was necessary, in previous versions, to review the link between relational calculus/algebra and 'SQL', since one couldn't even rely on the normal advice about normalisation when subqueries were not supported...

(Btw, I'd be very interested to know if this still stands - I gave up with it when I found out how far from a relational DBMS it was a few years back...)

Re:It's specifically about MySQL. (1)

Zontar The Mindless (9002) | more than 8 years ago | (#13919908)

Subqueries - supported in 4.1.

Strict data handling (in strict mode, if the data doesn't fit the column type, it's rejected with an error), INFORMATION_SCHEMA, and SQLSTATE error messages - supported in 5.0.

The handling of some joins has been changed in 5.0 so they're now compliant with SQL:2003.

More: What's New in MySQL 5.0 [mysql.com]

Re:It's specifically about MySQL. (-1, Troll)

CyricZ (887944) | more than 8 years ago | (#13920338)

Of course anyone who has any database experience uses at least PostgreSQL, if not something superior. That goes without saying. But then again, anyone who would use MySQL would most likely use PHP as well, and thus cannot be considered a person of any intelligence.

LOL (1)

Safety Cap (253500) | more than 8 years ago | (#13921512)

Unfortunately the Marching Morons [irasov.com] will win.

Re:Intermediate level? (1)

LDoggg_ (659725) | more than 8 years ago | (#13917909)

Design in my opinion should be mostly irrelavent to the database its implemented on.

"Should" being the operative word.
In practice, this just isn't the case.

For example, a unique ID for a primary key on a database could be implemented as a autonumber field in mysql, or a sequence in oracle.
This changes the application using the database. What if that ID is the foreign key for child tables? Transactional support may be handled differently if the parent table's primary key is known before initiating the transaction.

In this case, if sequences were considered baseline database functionality, the particular database being used would be less relevant.

Quiet in this thread (4, Interesting)

AKAImBatman (238306) | more than 8 years ago | (#13917510)

For novice users, mention is made of the "--I-am-a-dummy" option which warns and provides a second chance to avoid inadvertent updating or deleting of a table.

Perhaps something less insulting to the user should have been chosen? e.g. "--novice" or "--safety=on"? I understand that they're trying to be funny, but they've never seen a highly frustrated newbie before. The poor sap may be so flustered that having the documentation call him a "dummy" might just be the last straw.

Alternatively, your boss might not find it so funny when you tell him you'll just flip on the "I'm a dummy" flag. I know that my boss wasn't too impressed when I told him that I was going to use Bouncy Castle [bouncycastle.org] for encryption. The API is really great, but the name doesn't exactly scream "Professionsl!"

In the same vein, I always got a kick out of the naming for the ElectricFire [mozilla.org] JVM. From "How did the project get it's name?":

Scott Silver, one of the first EF developers, originally wanted to codename the project "Sexual Chocolate". (I'm not making this up.) That name was rejected, presumably because it would confuse Netscape's managers: "So, this Sexual Chocolate project actually has nothing to do with chocolate ?" Instead, Silver proposed "Electrical Fire" (two separate words). For the open-source release, Scott Furman coalesced the two words into one: "ElectricalFire", to make it apparent that the project was not to be confused with a safety hazard. A word of advice for the wise: if you end up working on a project with Scott Silver, do not allow him to handle the project codename.

Re:Quiet in this thread (5, Informative)

MrWiggum (910429) | more than 8 years ago | (#13917621)

the --i-am-a-dummy is an alias to a less unsulting option --safe-updates

Re:Quiet in this thread (0)

Anonymous Coward | more than 8 years ago | (#13917850)

Why dont you just go ahead and say it: its not politically correct enough for stuck up whores such as yourself.

Re:Quiet in this thread (0)

Anonymous Coward | more than 8 years ago | (#13917862)

The API is really great, but the name doesn't exactly scream "Professionsl!"


*bursts in through interview room window in a cape*
HYRE ME 4 TEH JOB LOL! I'M A PROFESSIONSL1!

Re:Quiet in this thread (1)

Surye (580125) | more than 8 years ago | (#13918140)

Hahaha. This actually made me laugh. At work no less. *hides from thought police*

Re:Quiet in this thread (1)

Redize_007 (633164) | more than 8 years ago | (#13918476)

The API is really great, but the name doesn't exactly scream "Professionsl!" ummmm, neither does that ;-)

Re:Quiet in this thread (1)

Feelgood (59095) | more than 8 years ago | (#13918818)

It isn't just for novices. I work almost exclusively on the command line for mysql (it is so much faster than the GUI or phpMyAdmin). I am in the habit of typing my where statement immediately after I type 'delete' or 'update' and then going back and filling in the table name and update fields just so I don't accidentally blow away a table. However, on one occasion, I had typed "delete where field='foo';" and then, as is my habit, went back and typed in the table name. Unfortunately, I happened to type a semicolon after the table name, so instead of "delete from tablename where field='foo';" I entered "delete from tablename; where field='foo';" This promptly blew away my table and then returned a quick syntax on my unintended 2nd statement.

Ever since that 1 mistake, I have mysql aliased to "mysql --i-am-a-dummy" (not "mysql --safe-update") just so I don't do that again.

Re:Quiet in this thread (1)

Pathwalker (103) | more than 8 years ago | (#13919759)

So why didn't you just issue a ROLLBACK; and undo the delete, drop of the wrong table, drop of a column, etc. - whatever the mistake was.?

I don't see the need for a new option to warn people when they make major changes to the database, when the transaction system should be able to take care of it.

MySql has transactions now, right? Just get people into the habit of typing BEGIN; before they start to work, and they shouldn't get into trouble, an d no insultingly named options are needed.

DDL autocommits (1)

Jamesday (794888) | more than 8 years ago | (#13920366)

DDL causes an automatic commit, so you can't roll it back.

Re:DDL autocommits (1)

Pathwalker (103) | more than 8 years ago | (#13920602)

Really? - that sucks. From all of the cheering abour MySQL supporting transactions, I had assumed that it actually supported transactions in a non-half-assed manner.

PostgreSQL has no problem rolling back table changes - I can open a transaction and create or drop tables; add, delete, or change the types of columns in tables, change rules, triggers, and stored procedures, and undo everything with a single ROLLBACK;.

It's really handy, because I can make a set of changes, and run some test queries to make sure everything works the way I expect it to, before I do the final COMMIT;.

With SAVEPOINT, I can even roll back the queries I did after making the DDL changes, and still commit the DDL change itself.

I guess I've got another reason to stick with it, and not give MySQL a shot.

Re:DDL autocommits (1)

Jamesday (794888) | more than 8 years ago | (#13922649)

MySQL and Postgress differ in interesting ways. For example. MySQL now supports the XA distributed transaction standard, beyond the two phase commit planned for PostgreSQL 8.1. It's well worth it for PG users to try MySQL with their real applications, IMO - seems likely to be the only way to find out which really is better for each application, unless the app needs something which is only present in one or the other of them.

Re:Quiet in this thread (1)

robgamble (925419) | more than 8 years ago | (#13918956)

Maybe Furman was an Alice in Chains fan. Layne Staley rasps out "Sexual Chocolate, baby!" at the end of Real Thing. You can also hear him hack up his esophagus, which is good for a laugh.

Re:Quiet in this thread (1)

killjoe (766577) | more than 8 years ago | (#13921218)

I think the i am a dummy switch is great. One time I was upgrading debian using dist upgrade but of course I had to do things my way so typed in a apt-get upgrade on one of the packages I wasn't suppoed to. Apt of course balked and said it wasn't going to upgrade the package unless I typed "I realize this is a bad idea". Yes the whole phrase. So being an idiot I typed the phrase in and proceeded to break my system.

I find linux error messages refreshingly human. Often verbose and clear, in the vein of "I am looking for a file in directory /etc/something/something but I can't find it" rather then the windows "file not found" or worse yet "overflow" error messages.

As for product names if we left it to the "professionals" every product would be named "word" or "windows" or "notepad" or some boring soul-less crap. Worse yet it would be some non sensical word like "vista". Hey guys check out my vista!. Buy hey who am kidding those soul-less professional corporate types have already gotten a copyright on every word in every language anyway if you name your product anything other then "rottenPorkChop" they will sue your ass off.

Re:Quiet in this thread (1)

petermgreen (876956) | more than 8 years ago | (#13937853)

fyi the phrase is actually "Yes, do as I say!" and i had to actually enter it once to make a system upgrade (i think there was some old package on thier that was for some reason marked as essential) but you can bet i took care to triple check what it was listing it would do before i typed that phrase.

Pre-requisite Packages... (5, Informative)

url80 (927250) | more than 8 years ago | (#13917514)

Unfortunately, the book expects the installation of several non-essential packages beyond the MySQL client and server. These include Apache, PHP, phpMyAdmin, and Perl (Chapter 2). Then, the introductory example (Chapter 3) is mostly about programming and testing an application in PHP with a MySQL database as a backend. At this point, I realized that the organization of the book did not meet my needs and purchased "MySQL (Third Edition)" by Paul DuBois, the organization of which demonstrates that it really concentrates on MySQL and which is actually the definitive guide I was originally looking for.

Re:Pre-requisite Packages... (0)

Anonymous Coward | more than 8 years ago | (#13917726)

Yep - the New Riders MySQL book by DuBois is great. The rest just gather dust on my shelf.

MySQL is rarely used alone. (1)

CyricZ (887944) | more than 8 years ago | (#13917821)

MySQL is rarely used alone. Frankly, it's probably not a bad idea to show it being integrated with other technologies, especially ones as popular and available as those.

Considering that MySQL is mainly used for web-based tasks, it's most likely a very useful choice for most people who are purchasing the book. It gives them what they want, while also offering examples to those who are using MySQL for non-WWW-related jobs.

Amen! (Was:Pre-requisite Packages...) (0)

Anonymous Coward | more than 8 years ago | (#13918015)

Paul's book is so superior to any other tripe out there, I'm amazed anyone else even bothers to update their competing offerings.

I truly look forward to his update.

Re:Pre-requisite Packages... (0)

Anonymous Coward | more than 8 years ago | (#13918148)

I own this book, it most certainly does not require the installation of the aforementioned packages. Apparently this troll hasn't actually taken the time to even peruse it.

btw, all said, it's a pretty good book. I own the second edition but bought this one also because of the discussion of new MySQL 5 features.

Re:Pre-requisite Packages... (1)

freakou (927441) | more than 8 years ago | (#13921629)

Yes, DuBois' book is better source of MySQL knowledge. But most people I know use MySQL along with a scripting language like Perl/PHP, so "The Definitive Guide" definitely has its merit.

On the other hand, what I didn't like about this particular book is that it covers use of many languages (Java/Perl/PHP/C/VB) on the surface, without getting into the gory details of any language that one needs for real programming.

For example, last week I was trying to figure out the best way to use "datetime" types in MySQL through Perl. Although Chapter 16 covers MySQL interfacing with Perl, it doesn't cover such topics in detail.

So basically, the definitive guide is useful as a reference or to get you started. But ultimately to solve a particular problem at hand, you very often end up googling or refering to the mailing lists.

MySQL (3rd ed) Paul DuBois (1)

Tune (17738) | more than 8 years ago | (#13922233)

I bought Paul DuBois' third edition a while ago; read most of it. It's a thorough work, but my main complaint is that it doesn't provide a descent index. Many terms are just missing, or don't refer to the most relevant pages. The kind invitation to send suggestions for improvements to indexes@samspublishing.com isn't really tempting either...

Also, forward references to sections are a hasle as sections lack numbering (granularity is just chapters) and a page number isn't provided either. For a book this big (over 1200 pages) that is a big mistake cos it's bound to be used as a reference manual rather than another nice read.

Also, I took some time to collect typo's and (minor) errors and mailed those to Paul DuBois. I was a bit disappointed by him not responding....

(Notice that my comments are not intended to lift opinions on "The Definitive Guide to MySQL 5". Haven't read that, but from the looks of it, DuBois' book still seems superiour.

"That is not a criticism of the author..." (3, Funny)

sco08y (615665) | more than 8 years ago | (#13917577)

"That is not a criticism of the author..." You can say that again.

Aside from a few sentences of vague praise, the bulk of this "book review" is a summary of the table of contents.

How about a guide to embedding Gecko? (0, Offtopic)

CyricZ (887944) | more than 8 years ago | (#13917587)

While this has nothing to do with MySQL directly, I think it would be fantastic if the Mozilla people were able to come up with a decent book regarding the embedding of the Gecko rendering engine.

Indeed, the online documentation is terrible. It is horribly outdated (we're talking 2 or 3 years here), and thus barely relevant today. Even if it might still be somewhat useful, there are often interfaces that have been changed, and the documentation ends up being more misleading than helpful. The example programs aren't exactly that good, either. They lack comments that truly describe what is going on, what pitfalls to watch out for, and so on.

Developers won't bother to embed Gecko within their products if it is difficult to find documentation describing how to do so. I, and I know others, do not have time to sift through the millions of lines of the Mozilla codebase, just to try to find out where the existing documentation is incorrect, invalid or outdated.

At least the MySQL project offers decent documentation with their project. This book isn't completely necessary. However, there are some projects that don't offer documentation at all, or that which they do offer is severely lacking. The Mozilla project, for instance, does need to publish some sort of a book on embedding Gecko.

Re:How about a guide to embedding Gecko? (0)

Anonymous Coward | more than 8 years ago | (#13917631)

While this has nothing to do with MySQL directly...

As with most of your comments, you probably should have quit after the first few words, while you were ahead.

Re:How about a guide to embedding Gecko? (1)

AKAImBatman (238306) | more than 8 years ago | (#13917656)

While this has nothing to do with MySQL directly, I think it would be fantastic if the Mozilla people were able to come up with a decent book regarding the embedding of the Gecko rendering engine.

I think I remember seeing a book on this when I did my article on free books [blogspot.com] . Ah, here we are. [phptr.com] If I'm not mistaken, "Rapid Application Development with Mozilla" should cover the topic you're interested in. You can even download it [phptr.com] at no cost as part of Peren's dedication to Open Source Books.

Embedding Gecko, or using it as a platform? (1)

CyricZ (887944) | more than 8 years ago | (#13917722)

Does that book talk about embedding Gecko within programs, or building applications (such as Firefox, Thunderbird, etc.) on top of Gecko? Those are two completely different tasks.

Re:Embedding Gecko, or using it as a platform? (1)

AKAImBatman (238306) | more than 8 years ago | (#13917773)

No, those two are pretty much the same. Perhaps that's why the documentation [mozilla.org] is confusing you? A web browser is merely a wrapper around the HTML control that provides the "browsing" experience. For your own application, you'd pull up the HTML control whenever you needed it as opposed to using it centrally. Other than that, there really are no differences.

If you're thinking that they're different, perhaps you're only looking for the ActiveX Control [mozilla.org] ? You can get the binaries here [www.iol.ie] . It should work *exactly* like IE.

They're two separate activities. (1)

CyricZ (887944) | more than 8 years ago | (#13917969)

I'm aware of the ActiveX control, and that is not what I want. I have read the documentation. What is there is significantly incomplete or out of date, or was as of August.

Most of the documentation focuses on using XUL to design Firefox-like applications. It looks like that book focuses on that as well. I was considering embedding Gecko into a proprietary C++ GUI toolkit. I was not interested in designing an XUL application on top of Mozilla. That is why such documentation was useless.

The somewhat relevant documentation and examples are severely lacking. Look at this XPCOM documentation [mozilla.org] . Many of the links are broken, and much of the content just isn't there.

Re:They're two separate activities. (1)

AKAImBatman (238306) | more than 8 years ago | (#13918283)

AFAIK, you should be able to ignore the XUL if you don't need it. All you really need is to intialize the XPCom system, then embed the nsWebBrowser into whatever application you are working on. For example, here's an MFC "brower" [mozilla.org] and here's a GTK "browser" [mozilla.org] . (The latter being based on the GTK Embed [mozilla.org] widget.) The rest of the docs go on to explain all the wonderful features you can make use of, including XUL.

At the end of the day, though, the only way to really get going is to do as the Embedding FAQ [mozilla.org] suggests, and start mucking with one of the example browsers. :-)

P.S. If you're looking to embed Mozilla in Java, the Blackwood Webclient [mozilla.org] is pretty much ready to go.

Re:They're two separate activities. (0, Troll)

CyricZ (887944) | more than 8 years ago | (#13920576)

I know about the examples. They are the ones I mentioned earlier, had you bothered to read my posts. Take a look at them. They're very poorly commented, and the overall quality is poor. They're meant more as quick tests than they are as examples of any merit.

Frankly, people who are developing serious projects (that is, often for money) with Mozilla do not have time to "muck around" with examples, especially ones of atrocious quality. We need solid documentation that is up-to-date, accurate, helpful and with clear, well-engineered examples. The Mozilla project is not providing that, and if they want widespread adoption of their browser, they most likely should offer high-quality documentation and examples.

Re:They're two separate activities. (1)

AKAImBatman (238306) | more than 8 years ago | (#13921234)

Actually, you mentioned only the documentation on embedding, not the examples themsevles. Which is beside the point. My only point is that building a web browser and embedding Gecko are one and the same activity. :-)

Frankly, people who are developing serious projects (that is, often for money) with Mozilla do not have time to "muck around" with examples, especially ones of atrocious quality.

Well, the way I see it your options are:

1. Read the book I linked to and gleen enough internal understanding of the system to accomplish what you're trying to do.
2. Muck around with the examples.
3. Ask this same question on netscape.public.mozilla.embedding [google.com] and see if they have any better options for you.

We need solid documentation that is up-to-date, accurate, helpful and with clear, well-engineered examples.

Agreed. Sadly, we don't have them, and we don't have any other options. (You could try KHTML or WebCore, but I doubt you'll get much farther.) This means that what you lack in documentation, you'll need to make up for in a smidge of perseverance.

In any case, I wish you the best of luck. If you get the thing running, please do inject some better docs onto the web. :-)

You're wrong on several counts. (1)

CyricZ (887944) | more than 8 years ago | (#13922618)

No, I mentioned the examples and their horrible quality way back in my original post: "The example programs aren't exactly that good, either. They lack comments that truly describe what is going on, what pitfalls to watch out for, and so on. [slashdot.org] "

I read the book you linked to. It is about creating XUL applications on top of Mozilla. It is not about embedding Mozilla within existing applications. Hence it is useless.

The examples are basically useless to much around with. They are poorly documented, and are meant more as tests than as practical examples.

That newsgroup gets very little activity. I'm not about to waste my time there.

Re:You're wrong on several counts. (0)

Anonymous Coward | more than 8 years ago | (#13955656)

Then go away. No one cares. N-o o-n-e. I doubt even you do. Troll

Correction (1)

AKAImBatman (238306) | more than 8 years ago | (#13917725)

Here's the correct PDF link. [phptr.com] I accidently linked to the book on eCos. (Not that it isn't an interesting book...)

My take... (4, Funny)

butterwise (862336) | more than 8 years ago | (#13917943)

With The Definitive Guide to MySQL 5, Michael Kofler masterfully concocts an intelligent and lucid thriller that marries the gusto of an international murder mystery with a collection of fascinating esoteria culled from 2,000 years of Western history.

A murder in the silent after-hour halls of the Louvre museum reveals a sinister plot to uncover a secret that has been protected by a clandestine society since the days of Christ. The victim is a high-ranking agent of this ancient society who, in the moments before his death, manages to leave gruesome clues at the scene that only his granddaughter, noted cryptographer Sophie Neveu, and Robert Langdon, a famed symbologist, can untangle. The duo become both suspects and detectives searching for not only Neveu's grandfather's murderer but also the stunning secret of the ages he was charged to protect. Mere steps ahead of the authorities and the deadly competition, the mystery leads Neveu and Langdon on a breathless flight through France, England, and history itself. Kofler has created a page-turning thriller that also provides an amazing interpretation of Western history. Kofler's hero and heroine embark on a lofty and intriguing exploration of some of Western culture's greatest mysteries--from the nature of the Mona Lisa's smile to the secret of the Holy Grail. Though some will quibble with the veracity of Kofler's conjectures, therein lies the fun. The Definitive Guide to MySQL 5 is an enthralling read that provides rich food for thought.

Re:My take... (1)

JabberWokky (19442) | more than 8 years ago | (#13919200)

I suppose this explains why the Vatican uses Postgres.

--
Evan

Re:My take... (0)

Anonymous Coward | more than 8 years ago | (#13919804)

> ...the Vatican uses Postgres.

There you have it, folks - Proof that Postgres promotes the spread of AIDS!

mod doh3n (-1, Offtopic)

Anonymous Coward | more than 8 years ago | (#13918004)

that comp8ise

Save some money! (0)

Anonymous Coward | more than 8 years ago | (#13918120)

Save yourself SEVENTEEN BUCKS ($17!) by buying the book here: The Definitive Guide to MySQL 5 [amazon.com] . And if you use the "secret" A9.com discount [amazon.com] , you can save an extra 1.57%!

MARE (-1, Offtopic)

Anonymous Coward | more than 8 years ago | (#13918127)

reformaated beyond the scope of to its laid-back surprise to the you're told. It's dying. Everyone with the work, or backwards. To the

What about 4.0 to 5.0? (0)

Anonymous Coward | more than 8 years ago | (#13918224)

All of the upgrade information I've seen thus far is for 4.1 to 5.0, but what about those of us still using 4.0. Or what about users still using 3.x?

Is there an easy upgrade path for us?

Re:What about 4.0 to 5.0? (1)

generationxyu (630468) | more than 8 years ago | (#13920281)

You probably have to upgrade to 4.1 first -- I know 4.1 is a non-trivial upgrade. Gentoo won't let you do it directly, you have to back up, upgrade, and reimport. The biggest problem is revdep-rebuild (rebuilding packages linking against the old libmysqlclient), which took a while. All told, I had probably about an hour of downtime, but my database isn't very big.

Step One: Install postgresql. (0)

Anonymous Coward | more than 8 years ago | (#13918709)

Step Zero: Install FreeBSD.

Step One Plus One: Underpants.

Step Three: ..

Step Two Squared: Profit.

Definitive guide to mysql in 4 letters: (0)

Anonymous Coward | more than 8 years ago | (#13919070)

Don't!

mogd d8own (-1, Redundant)

Anonymous Coward | more than 8 years ago | (#13919385)

PHP is not the natural companion any more (1)

bertilow (218923) | more than 8 years ago | (#13920121)

Most of the attention is given to PHP, which is described as a natural companion to MySQL for use in developing dynamic web applications.

Since MySQL 5.0 handles Unicode really well (except for regular expressions), and since PHP has close to zero Unicode support, and since any serious programming uses Unicode today, it's hardly correct to see PHP as the natural companion to MySQL 5.0. Perl and Python and Ruby however have excellent Unicode support.

It will probably be a while before we see decent Unicode support in PHP - I'm very sorry to say.

Re:PHP is not the natural companion any more (0)

Anonymous Coward | more than 8 years ago | (#13921905)

...and since PHP has close to zero Unicode support...

Well, I'm no fan of PHP, but it certainly does have much more unicode support than "close to zero".

, and since any serious programming uses Unicode today, it's hardly correct to see PHP as the natural companion to MySQL 5.0.

Yes. All serious programming involves unicode today, even the NASA engineers included UTF-8 support in their latest rover.. oh wait, they didn't.

Neither of the websites I've made over the last 10 years have used UTF-8, and you know what? They work just fine without it.

To sum it up: You're an idiot.

ad-review (1)

dzafez (897002) | more than 8 years ago | (#13920135)

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

Do you have to put that there? Is this really needed?

Re:ad-review (0)

Anonymous Coward | more than 8 years ago | (#13923262)

Do you have to put that there? Is this really needed?

It's to be anti-Amazon: they've got an issue with all Amazon's patent shenanigans.

I can't read if that's an affiliate link or not, I don't know bn.com's URL format.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?