Contents

MySQL: The Complete Reference is broadly divided into four parts. Here�s what each part contains:

Part I: Installation provides an introduction to MySQL and guides you through the process of installing it, on both UNIX and Windows.

  • Chapter 1, "Introducing MySQL," discusses MySQL�s history and evolution, looks at its feature set, and explains why it offers such a compelling value proposition.
  • Chapter 2, "A Technical Tour Of MySQL," peeks under the hood to see what makes MySQL tick, explaining the various MySQL subsystems and how they interact with each other.
  • Chapter 3, "MySQL Installation," discusses how to obtain, install, configure, and test the MySQL server, on UNIX and Microsoft Windows. It also explains the differences between the different MySQL server versions available, with a view to helping you select the right one for your needs.

Part II, "Usage," discusses practical usage of the MySQL server, explaining how to use the SQL command set to create databases and tables, add and remove records, execute queries, and use advanced MySQL 4.x features like transactions and subqueries.

  • Chapter 4, "SQL Language Basics," discusses the history and evolution of SQL, and includes a simple tutorial to familiarize new users with the basic SQL commands used to create and enter information into a database.
  • Chapter 5, "MySQL Data Types," examines the various data types supported by MySQL, and explains how they can be used to enforce table consistency and integrity.
  • Chapter 6, "MySQL Operators," introduces MySQL�s arithmetic, logical, comparison and bit operators, and demonstrates how they may be used to perform calculations, comparisons and conversions.
  • Chapter 7, "MySQL Functions," discusses MySQL�s immense array of built-in functions, showing you how they allow MySQL developers to perform operations ranging from date manipulation to password encryption, with minimal time and fuss.
  • Chapter 8, "Working With Databases and Tables," takes an in-depth look at the database and table structures used by MySQL to store its data, and explains the SQL commands used to create, alter and delete databases, tables, and indexes. The core of this chapter is a discussion of MySQL�s powerful CREATE TABLE command which offers a fine degree of control over the table creation process, and an examination of foreign keys and full-text indexes, both of which are relatively new to MySQL.
  • Chapter 9, "Working With Data," continues where the previous chapter left off, explaining how to insert records into an existing MySQL database. The first part of this chapter discusses the INSERT, UPDATE, and DELETE SQL commands, illustrating how they can be used to manipulate database records and throwing light on some MySQL-specific twists to the standard command syntax. The second half examines the SELECT statement in depth, showing how it can be used to create filtered subsets of the records in a database; sort, group and count records; use session variables; and import and export data in a variety of different formats.
  • Chapter 10, "Joins," discusses multi-table queries, showing how the relationships between tables can be used to combine records in different ways to produce more useful reports. This chapter discusses the various types of joins, and demonstrates their usage in a number of different situations.
  • Chapter 11, "Subqueries," teaches you how to nest queries within one another for more sophisticated query operations, a feature newly introduced in MySQL 4.1.
  • Chapter 12, "Transactions," examines another new (and extremely powerful) MySQL 4.x feature: the ability to group a series of SQL statements into a single unit and execute them atomically, or undo the entire set of changes in the event of an error.

Part III, "Administration," discusses the tasks involved in administering and maintaining a MySQL RDBMS, covering such topics as database backup and repair, security, access control, activity logging, server optimization, and troubleshooting.

  • Chapter 13, "Administration and Configuration," examines the role of a MySQL database administrator, explaining common tasks like starting and stopping the server, altering the default server configuration, and inspecting the MySQL log files.
  • Chapter 14, "Access Control and Privileges," discusses the MySQL security and privilege system, and the management of user accounts and passwords (including what do to if you forget the MySQL superuser password).
  • Chapter 15, "Maintenance, Backup and Recovery," provides instructions and information on how to back up and restore a MySQL database, as well as how to use MySQL-supplies utilities to recover data from a damaged database.
  • Chapter 16, "Replication," discusses another of MySQL�s more interesting and powerful features: the ability to automatically synchronize databases across different hosts.
  • Chapter 17, "Performance Optimization," offers tips and tricks to squeeze the maximum performance out of your MySQL server, including information on how to optimize queries for faster execution; alter cache and buffer settings for quicker responses; and use special compile-time parameters for more efficient resource usage.

Part IV, "Development," is aimed squarely at developers�it discusses the MySQL APIs, a set of full-featured, powerful tools for building custom data-driven MySQL applications. This section includes examples and source code for the C, Perl, and PHP APIs.

  • Chapter 18, "The MySQL APIs," explains the need and rationale behind exposing MySQL�s innards via a series of APIs, and provides a brief description of the capabilities included in the various APIs. In an attempt to help developers select the API that is best suited to their specific needs, the chapter also includes a discussion of the benefits of the different APIs vis-<>-vis each other.
  • Chapter 19, "MySQL and C," explains how to write MySQL client applications using the C library API that ships with the MySQL distribution. Real-world examples include an interactive command-line SQL client and an interactive expense tracker that supports data entry and simple report generation.
  • Chapter 20, "MySQL and Perl," discusses the Perl DBI, with specific reference to the MySQL driver and the DBI methods that make it possible to interact with a MySQL database through a Perl script. The real-world application here is a CGI-based threaded comments system, accessible via a standard web browser and suitable for use on any content-rich web site.
  • Chapter 21, "MySQL and PHP," rounds out the section with a look at PHP, a popular scripting language for database-backed Web applications that comes with built-in support for MySQL. In addition to a detailed discussion of the relevant PHP functions, the chapter demonstrates the real-world viability of the MySQL-PHP combination through a database-driven bookmark application suitable for use in any web browser.

Read a sample chapter, find out more about the team behind the book, or get your copy now!

copyright © Melonfire, 2003. all rights reserved.