MySQL Stored Procedure Programming: Building High-Performance Web Applications in MySQL

Front Cover
"O'Reilly Media, Inc.", Mar 28, 2006 - Computers - 640 pages

The implementation of stored procedures in MySQL 5.0 a hugemilestone -- one that is expected to lead to widespread enterprise adoption ofthe already extremely popular MySQL database. If you are serious aboutbuilding the web-based database applications of the future, you need toget up to speed quickly on how stored procedures work -- and how tobuild them the right way. This book, destined to be the bible of storedprocedure development, is a resource that no real MySQL programmer canafford to do without.

In the decade since MySQL burst on the scene, it has become thedominant open source database, with capabilities and performancerivaling those of commercial RDBMS offerings like Oracle and SQLServer. Along with Linux and PHP, MySQL is at the heart of millions ofapplications. And now, with support for stored procedures, functions,and triggers in MySQL 5.0, MySQL offers the programming power neededfor true enterprise use.

MySQL's new procedural language has a straightforward syntax, making iteasy to write simple programs. But it's not so easy to write secure,easily maintained, high-performance, and bug-free programs. Few in theMySQL world have substantial experience yet with stored procedures, butGuy Harrison and Steven Feuerstein have decades of combined expertise.

In MySQL Stored Procedure Programming, they putthat hard-won experience to good use. Packed with code examples and coveringeverything from language basics to application building to advancedtuning and best practices, this highly readable book is the one-stopguide to MySQL development. It consists of four major sections:

  • MySQL stored programming fundamentals -- tutorial, basicstatements, SQL in stored programs, and error handling
  • Building MySQL stored programs -- transaction handling,built-in functions, stored functions, and triggers
  • MySQL stored programs in applications -- using storedprograms with PHP, Java, Perl, Python, and .NET (C# and VB.NET)
  • Optimizing MySQL stored programs -- security, basic andadvanced SQL tuning, optimizing stored program code, and programmingbest practices

A companion web site contains many thousands of lines of code, that youcan put to use immediately.

Guy Harrison is Chief Architect of Database Solutions at Quest Softwareand a frequent speaker and writer on MySQL topics. Steven Feuerstein isthe author of Oracle PL/SQL Programming, the classic reference for Oracle stored programming for more than ten years. Both have decades of experience as database developers, and between them they have authored a dozen books.


Selected pages


Part I
Introduction to MySQL Stored Programs
MySQL Stored Programming Tutorial
Language Fundamentals
Blocks Conditional Statements and Iterative Programming
Using SQL in Stored Programming
Error Handling
Using MySQL Stored Programs in Applications
Using MySQL Stored Programs with PHP
Using MySQL Stored Programs with Java
Using MySQL Stored Programs with Perl
Using MySQL Stored Programs with Python
Using MySQL Stored Programs with NET
Part IV
Stored Program Security

Part II
Creating and Maintaining Stored Programs
Transaction Management
MySQL Builtin Functions
Stored Functions
Part III
Tuning Stored Programs and Their SQL
Basic SQL Tuning
Advanced SQL Tuning
Optimizing Stored Program Code
Best Practices in MySQL Stored Program Development

Other editions - View all

Common terms and phrases

Bibliographic information