The Definitive Guide to MySQL 5

3rd edition

cover

About this book
3rd edition (September 2005)
784 pages
Publisher: apress
Translator: David Kramer
ISBN: 1590595351
Price: $ 49.95

Other editions of this book:
Original German edition (Addison-Wesley)
French translation of 3nd ed (eyrolles)
Italian translation of 3rd ed (apoge)
Chinese translation of 3rd ed (DrMaster)
Czech translation of 3rd ed (Computer Press)


Back cover text

MySQL 5 is slated to be the most significant release in the product's history. The Definitive Guide to MySQL 5, Third Edition, is the newest revision of Michael Kofler's popular book. This is the first book to offer in-depth instruction about the new features of the world's most popular open source database server. Updated to reflect changes in MySQL version 5, this book will expose you to MySQL's impressive array of new features: views, stored procedures, triggers, and spatial data types.

Whether you're a novice or intermediate user, you will benefit from extensive coverage of core MySQL features like user administration, basic and advanced querying, and security. You will also be introduced to several standard and third-party tools, like MySQL Administrator, Query Browser, and the popular PHPMyAdmin tool.

Letter to the reader

Dear Reader,

MySQL is the most popular open source database on the planet. In this book, I show you how to install MySQL and build applications using a broad range of programming languages. Throughout, you'll find a wealth of real-world examples, programming techniques, and SQL recipes. The book covers all of the new features of MySQL, such as triggers, views, stored procedures, subSELECTs, transactions, foreign-key rules, and Unicode support.

In the first part of the book, I show you how to install MySQL, PHP, and a number of other tools. Both Windows and Linux are covered. A first example, a simple opinion poll system, helps you to get acquainted with the system.

The second part discusses MySQL administration tools and user interfaces. I'll begin with an introduction to MySQL's command-line utilities, discussing mysql, mysqladmin, and mysqldump.You'll learn how to use administration tools such as phpMyAdmin, MySQL Administrator, and MySQL Query Browser. This part concludes with a chapter showing you how to use Microsoft Office, Sun StarOffice, and OpenOffice to interact with MySQL.

Part three introduces you to sound database design principles, showing you how to use SQL to query and manage your data. You will also find detailed information and many examples for stored procedures (new in MySQL 5.0) and GIS functions (new in MySQL 4.1). Advanced readers will enjoy the in-depth coverage of several administration topics, including security, backups, logging, and replication.

Part four deals with MySQL application development. Since MySQL is used most often together with PHP, I focus on this programming language. However, if you don't want to use PHP, you'll also find chapters on Perl, Java, C, C#, Visual Basic, and Visual Basic.NET.

In combination with the sample databases and programs available for download at the Apress Web site, this book provides a complete foundation for any My SQL project. I hope that you'll enjoy working with MySQL as much as I enjoyed writing this book!

Michael Kofler


Table of Content
Part I: Introduction
  • What is MySQL? When to use it (and when not).

  • Getting started: Installation of a test environment for Windows and Linux (WAMP/LAMP, that is Windows or Linux + Apache + MySQL + PHP or Perl).

  • Introductory example: Opinion poll with PHP.

Part II: Administration tools and user interfaces

  • mysql, mysqladmin, mysqldump

  • MySQL Administrator, MySQL Query Browser

  • phpMyAdmin

  • Microsoft Office, StarOffice/OpenOffice

Part III: Fundamentals

  • Database design: The idea of relational databases. Relations, normalization, indices, hierarchies. Table types, column types. Views. Many samples.

  • SQL: Introduction to SQL.

  • SQL Recipies: Many real-world SQL samples. Full-text search. Transactions.

  • Security: Explains the MySQL privileges system.

  • GIS functions: Using MySQL to process geographical data.

  • Stored Procedures and Triggers: Concepts, syntax and many real-world-samples.

  • Administration: Backups, Logging, Database migration, Import + Export, Replication and Tuning.

Part IV: Programming MySQL

  • PHP: Database programming with PHP 5. (Covers both the mysql and mysqli interface, but focus is on mysqli.) Introduction and programming techniques. Unicode. BLOBs. SP administrator. Many samples.

  • Perl: Database programming with Perl.

  • Java/JDBC: Database programming with Java using JDBC.

  • C: Database programming with C.

  • Visual Basic 6/VBA: Database programming with VB6 and VBA using and Connector/ODBC. Converter mssql2mysql (Microsoft SQL Server to MySQL).

  • Visual Basic 2005, C#: Database programming with Visual Basic 2005 and C# using ADO.NET and Connector/Net.

Part IV: Reference

  • SQL Reference

  • MySQL tools and their options: mysqladmin, myisamchk etc.

  • API reference: PHP (mysql/mysqli), Perl, JDBC, ADO.NET and C


Sample chapters
pdf Table of contents
pdf Sample chapter 8 (Database design)

Reviews

slashdot.com, Nov. 2005 (by John Suda):
contains nearly everything you would want and expect
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. [...] 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. (See the full review here.)

slashdot.com, Nov. 2004 (by Craig Maloney):
useful and complete reference to using and programming with MySQL, rating 10/10
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. (See the full review here. This review refers to the 2nd edition.)

Japan-Interface, 2003 (by David Powers): straightforward and easy-to-understand
I've always relied on "MySQL" by Paul DuBois, which I still think is an excellent book, but so is this one, and it has many features that probably make it a better choice for many people. [...] What I have found particularly useful in Kofler's book is the clear, logical layout with bold headings and important points highlighted, making it much easier to browse and find the information you're looking for. Another strong point in Kofler's favour is Chapter 5, a 50-page primer in database design. He takes the example of a database of books, and leads you through the process of working out the best structure for the tables. He handles the subject of normalization in straightforward, easy-to-understand terms, and describes the various types of table columns, with examples of how they should be used. There is no single "right" answer to database design, but Kofler presents a solution and then discusses the pros and cons. He takes a similar approach to many other issues, such as the choice between MySQL's default MyISAM tables and the newer InnoDB. Both have their advantages and drawbacks, but Kofler's sound advice makes the decision a lot clearer. (See the full review here. This review refers to the 2nd edition.)

thetechnologer.com, 2003 (by Tim): worth every page and every minute of your time
The introduction focused on the installation of MySQL on all major platforms and at the same time, broadens the book's scope to cover Apache, PHP and Perl. Kofler is in no way digressing because in comparison, a major part of the book is still focused on MySQL. But in a way, he is giving readers the opportunities to know more about the very solution that many are using at the moment -- the combination of Linux, Apache, MySQL and Perl or PHP. [...]

Never mind that the book was translated, never mind that the book has a total of over 600 pages, because in my humble opinion, it is worth every page and every minute of your time. (See the full review here. This review refers to the 1st edition.)

kemputing.net, 2002 (by M. Williams): a must for the novice and expert alike
There are a number of books written on the subject of MySQL databases. I have had the opportunity to read some and have found many of them lacking and confusing. I happened to get a glimpse of a book simply called MySQL, it seemed quite interesting and as I was about to build a dynamically driven website for a client I felt I should get this book as the others I have seen were not up to the job. As I suspected from my chancery glimpse, it was what I needed.

MySQL by Michael Kofler is a comprehensive guide to MySQL. The book explains how to install and configure MySQL on both Linux/UNIX and also on MS Windows NT/2000/9x environments. Kofler presents some of the issues one should consider when using MySQL. The books guides you through SQL programming and MySQL administration. (See the full review here. This review refers to the 1st edition.)

inewsagency.com, 2001: clear, thorough, useful, powerful
Whatever the secret formula that goes into aPress books, the result produced is clear, thorough, useful, powerful books, that are easy to read, grasp and apply. The titles are focused on explodingly popular computer topics. "MySQL" by Michael Kofler lives up to the high aPress standard.

Readers reviews for this edition: see amazon.com and amazon.co.uk.


Samples download ©

Links

Errata
html Errata and updates

Home
Back home.