| |
| |
About the Author | |
| |
| |
About the Translator | |
| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
| |
What Is MySQL? | |
| |
| |
What Is a Database? | |
| |
| |
MySQL | |
| |
| |
Limitations of MySQL | |
| |
| |
MySQL Version Numbers | |
| |
| |
MySQL Licensing | |
| |
| |
Alternatives to MySQL | |
| |
| |
Summary | |
| |
| |
| |
The Test Environment | |
| |
| |
Windows or Unix/Linux? | |
| |
| |
Installation Under Windows | |
| |
| |
Installation Under SUSE Linux 9.3 | |
| |
| |
Installation Under Red Hat Enterprise Linux 4 | |
| |
| |
Compiling the MySQL Developer Version (Linux) | |
| |
| |
Configuring Apache | |
| |
| |
Configuring PHP | |
| |
| |
Configuring MySQL | |
| |
| |
| |
Introductory Example (An Opinion Poll with PHP) | |
| |
| |
Overview | |
| |
| |
Database Development | |
| |
| |
The Questionnaire | |
| |
| |
Questionnaire Evaluation and Displaying Results | |
| |
| |
Ideas for Improvements | |
| |
| |
| |
Administrative Tools and User Interfaces | |
| |
| |
| |
mysql, mysqladmin, and mysqldump | |
| |
| |
mysql | |
| |
| |
mysqladmin | |
| |
| |
mysqldump | |
| |
| |
| |
MySQL Administrator and MySQL Query Browser | |
| |
| |
Installation | |
| |
| |
Establishing a Connection | |
| |
| |
MySQL Administrator | |
| |
| |
MySQL Query Browser | |
| |
| |
| |
phpMyAdmin | |
| |
| |
Installation and Configuration | |
| |
| |
User Management, Securing MySQL | |
| |
| |
Creating and Editing Databases | |
| |
| |
Viewing, Inserting, and Editing Data | |
| |
| |
Executing SQL Commands | |
| |
| |
Import and Export | |
| |
| |
Server Administration | |
| |
| |
Auxiliary Functions | |
| |
| |
| |
Microsoft Office, OpenOffice/StarOffice | |
| |
| |
Installing Connector/ODBC | |
| |
| |
Microsoft Access | |
| |
| |
Microsoft Excel | |
| |
| |
Connector/J Installation | |
| |
| |
OpenOffice/StarOffice Base | |
| |
| |
OpenOffice/StarOffice Data Source View | |
| |
| |
| |
Fundamentals | |
| |
| |
| |
Database Design | |
| |
| |
Further Reading | |
| |
| |
Table Types | |
| |
| |
MySQL Data Types | |
| |
| |
Tips and Tricks on Database Design | |
| |
| |
Normalization Rules | |
| |
| |
Managing Hierarchies | |
| |
| |
Relations | |
| |
| |
Primary and Foreign Keys | |
| |
| |
Indexes | |
| |
| |
Views | |
| |
| |
Example Database mylibrary (Library Management) | |
| |
| |
Example Database myforum (Discussion Group) | |
| |
| |
Example Database Exceptions (Special Cases) | |
| |
| |
| |
An Introduction to SQL | |
| |
| |
Introduction | |
| |
| |
Simple Queries (SELECT) | |
| |
| |
Sorting Records (ORDER BY) | |
| |
| |
Selecting Data Records (WHERE, HAVING) | |
| |
| |
Linking Data from Several Tables | |
| |
| |
Uniting Query Results | |
| |
| |
Grouped Queries, Aggregate Functions | |
| |
| |
Altering Data(INSERT, UPDATE, and DELETE) | |
| |
| |
Creating New Tables, Databases, and Indexes | |
| |
| |
| |
SQL Recipes | |
| |
| |
Character Strings | |
| |
| |
Date and Time | |
| |
| |
ENUMs and SETs | |
| |
| |
Variables and Conditionals (IF, CASE) | |
| |
| |
Copying Data from One Table to Another | |
| |
| |
Pivot Tables | |
| |
| |
SubSELECTs | |
| |
| |
Ensuring the Integrity of Data | |
| |
| |
Tracking Down Duplicates | |
| |
| |
Bringing a Table into Normal Form | |
| |
| |
Processing the First or Last n Records | |
| |
| |
Selecting Random Records | |
| |
| |
Full-Text Search | |
| |
| |
Locking | |
| |
| |
Transactions | |
| |
| |
| |
Access Administration and Security | |
| |
| |
Introduction | |
| |
| |
First Aid | |
| |
| |
The Internal Workings of the Access System | |
| |
| |
Tools for Setting Access Privileges | |
| |
| |
Secure Password Authentication Since MySQL 4.1 | |
| |
| |
Problems with Establishing a Connection | |
| |
| |
System Security | |
| |
| |
| |
GIS Functions | |
| |
| |
GIS Data Formats | |
| |
| |
MySQL's GIS Implementation | |
| |
| |
SQL Examples (the Database glacier) | |
| |
| |
SQL Examples (the Database opengeodb) | |
| |
| |
| |
Stored Procedures and Triggers | |
| |
| |
Why Stored Procedures? Why Triggers? | |
| |
| |
Hello, SP World! | |
| |
| |
SP Implementation | |
| |
| |
SP Administration | |
| |
| |
SP Syntax and Language Elements | |
| |
| |
SP Examples | |
| |
| |
Triggers | |
| |
| |
| |
Administration and Server Configuration | |
| |
| |
First Steps | |
| |
| |
Backups | |
| |
| |
Database Migration | |
| |
| |
Importing and Exporting Text Files | |
| |
| |
Logging | |
| |
| |
Replication | |
| |
| |
Administration of MyISAM Tables | |
| |
| |
Administration of InnoDB Tables | |
| |
| |
Server Tuning | |
| |
| |
ISP Database Administration | |
| |
| |
| |
Programming | |
| |
| |
| |
PHP | |
| |
| |
mysql Functions | |
| |
| |
mysqli Classes, Methods, and Properties | |
| |
| |
Outsourcing Database Functions into a Class | |
| |
| |
Displaying a SELECT Result As a Table | |
| |
| |
Character Strings, Dates, Times, BLOBs, and NULL | |
| |
| |
Inserting Linked Data Records | |
| |
| |
Processing Input from Forms | |
| |
| |
Pagewise Representation of Search Results | |
| |
| |
Managing Hierarchical Data | |
| |
| |
Speed Optimization | |
| |
| |
Unicode | |
| |
| |
Binary Data (BLOBs) and Images | |
| |
| |
Stored Procedures | |
| |
| |
SP Administrator | |
| |
| |
| |
Perl | |
| |
| |
Programming Techniques | |
| |
| |
Example: Deleting Invalid Data Records (mylibrary) | |
| |
| |
CGI Example: Library Management (mylibrary) | |
| |
| |
CGI Unicode Example | |
| |
| |
| |
Java (JDBC and Connector/J) | |
| |
| |
Introduction | |
| |
| |
Programming Techniques | |
| |
| |
| |
C | |
| |
| |
The C API (libmysqlclient) | |
| |
| |
Hello, World! | |
| |
| |
Establishing the Connection | |
| |
| |
Executing SQL Commands | |
| |
| |
Working with Binary Data and Special Characters | |
| |
| |
Error Handling | |
| |
| |
| |
Visual Basic 6/VBA | |
| |
| |
Fundamentals and Terminology | |
| |
| |
Connector/ODBC Options | |
| |
| |
ADO Programming and Visual Basic/VBA | |
| |
| |
Establishing the Connection | |
| |
| |
Converter: Microsoft SQL Server to MySQL | |
| |
| |
VBMySQLDirect | |
| |
| |
| |
Visual Basic .NET and C# | |
| |
| |
Communication Between ADO.NET and MySQL | |
| |
| |
Programming Techniques | |
| |
| |
Example: Storing New Titles in mylibrary | |
| |
| |
Example: Storing an Image File in a BLOB and Then Reading It | |
| |
| |
| |
Reference | |
| |
| |
| |
SQL Reference | |
| |
| |
Syntax | |
| |
| |
Operators | |
| |
| |
Variables and Constants | |
| |
| |
MySQL Data Types | |
| |
| |
Command Overview (Thematic) | |
| |
| |
Command Reference (Alphabetical) | |
| |
| |
Function Reference | |
| |
| |
GIS Data Types and Functions | |
| |
| |
Language Elements for Stored Procedures and Triggers | |
| |
| |
| |
MySQL Tools and Options | |
| |
| |
Overview | |
| |
| |
Common Options and Configuration Files | |
| |
| |
mysqld (Server) | |
| |
| |
mysqld_safe (Server Start) | |
| |
| |
mysql_install_db (New Installation of the mysql Database) | |
| |
| |
mysql_fix_privileges (Updating the mysql Database) | |
| |
| |
mysql_fix_extensions (Renaming MyISAM Files) | |
| |
| |
mysql (SQL Command Interpreter) | |
| |
| |
mysqladmin (Administration) | |
| |
| |
mysqldump (Backup/Export) | |
| |
| |
mysqlimport (Text Import, Bulk Import) | |
| |
| |
mysqlshow (Displaying Information) | |
| |
| |
myisamchk (Repairing MyISAM Files) | |
| |
| |
myisampack (Compressing MyISAM Files) | |
| |
| |
| |
API Reference | |
| |
| |
PHP API (mysql Interface) | |
| |
| |
PHP-API (mysqli Interface) | |
| |
| |
Perl DBI | |
| |
| |
JDBC (Connector/J) | |
| |
| |
ADO.NET (Connector/Net) | |
| |
| |
C API | |
| |
| |
| |
Appendixes | |
| |
| |
| |
Glossary | |
| |
| |
| |
The Files for this Book | |
| |
| |
Trying Out the Example Programs | |
| |
| |
Updates, Errata, Links, Discussion Forum | |
| |
| |
| |
Bibliography | |
| |
| |
Index | |