MySQL Stored Procedure Programming
By Guy Harrison, Steven Feuerstein
First Edition
March 2006
Pages: 636
ISBN 10: 0-596-10089-2 |
ISBN 13: 9780596100896




(Average of 2 Customer Reviews)


Book description
MySQL Stored Procedure Programming covers a lot of ground. The book starts with a thorough introduction to stored procedures programming and functions, covering the fundamentals of data types, operators, and using SQL in stored procedures. You'll learn how to build and maintain stored programs -- covering transactions, stored functions, and triggers -- and how to call and use MySQL-based stored procedures in a variety of languages, including PHP, Perl, Python, .NET, and Java. This book, destined to be the bible of stored procedure development, is a resource that no real MySQL programmer can afford to do without.
Full Description
The implementation of stored procedures in MySQL 5.0 a huge
milestone -- one that is expected to lead to widespread enterprise adoption of
the already extremely popular MySQL database. If you are serious about
building the web-based database applications of the future, you need to
get up to speed quickly on how stored procedures work -- and how to
build them the right way. This book, destined to be the bible of stored
procedure development, is a resource that no real MySQL programmer can
afford to do without.
In the decade since MySQL burst on the scene, it has become the
dominant open source database, with capabilities and performance
rivaling those of commercial RDBMS offerings like Oracle and SQL
Server. Along with Linux and PHP, MySQL is at the heart of millions of
applications. And now, with support for stored procedures, functions,
and triggers in MySQL 5.0, MySQL offers the programming power needed
for true enterprise use.
MySQL's new procedural language has a straightforward syntax, making it
easy to write simple programs. But it's not so easy to write secure,
easily maintained, high-performance, and bug-free programs. Few in the
MySQL world have substantial experience yet with stored procedures, but
Guy Harrison and Steven Feuerstein have decades of combined expertise.
In
MySQL Stored Procedure Programming, they put
that hard-won experience to good use. Packed with code examples and covering
everything from language basics to application building to advanced
tuning and best practices, this highly readable book is the one-stop
guide to MySQL development. It consists of four major sections:
- MySQL stored programming fundamentals -- tutorial, basic
statements, 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 stored
programs with PHP, Java, Perl, Python, and .NET (C# and VB.NET)
- Optimizing MySQL stored programs -- security, basic and
advanced SQL tuning, optimizing stored program code, and programming
best practices
A companion web site contains many thousands of lines of code, that you
can put to use immediately.
Guy Harrison is Chief Architect of Database Solutions at Quest Software
and a frequent speaker and writer on MySQL topics. Steven Feuerstein is
the 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.
Browse within this book
Cover
| Table of Contents
| Colophon
Featured customer reviews

A book to own!,
March 19 2008
Submitted by
joshSVUG
[
Respond |
View]
I found the book to be well written and balanced. The authors did a fine job breaking out the book into four major parts:
1) Stored Programming Fundamentals, where Stored Programs equal Procedures, Functions and Triggers.
2) Stored Program Construction, including a discussion about transaction management and MySQL built-in functions
3) Using Stored Programs in Application, a major boon as most other books focus on raw DML
4) Optimizing Stored Programs, as most of your stored programs will execute DML.
If you are going to use stored programs in your application/environment, you should buy this book.
MySQL Stored Procedures, In Depth,
December 19 2007
Submitted by
Dave Walz-Burkett
[
Respond |
View]
I have been working with MySQL for several years as a database back-end for Java, Ruby and C# programming projects. After upgrading to version 5, I have been meaning to look into MySQL's support for stored procedures.
The MySQL Stored Procedure Programming book was my first read on the subject and I found it quite useful. It covers not only stored procedures, but also functions and triggers, collectively called 'stored programs' in the book. While there are many books on MySQL, this book is dedicated to the stored programs domain and provides a lengthy treatment of the subject.
During the introduction, the authors provide a veritable laundry list of MySQL resources including many books and websites. The basic tools for creating stored programs in MySQL are visited and help set the groundwork for a 'read, type in the example and run it' feedback loop. Throughout the book, the examples are clear and easy to follow.
The introduction is followed by a brief tutorial, highlighting stored procedures, functions and triggers. What follows is two sections of chapters, over 200 pages in length, diving into the details of the stored procedure language fundamentals, blocks, conditional statements, iterative programming, error handling, the creation and maintenance of stored programs, transaction management, MySQL built-in functions, stored functions and triggers.
The next section of the book is of particular value to software developers that use MySQL in their applications. Over 150 pages showing you how to use MySQL stored programs from PHP, Java, Perl, Python and .NET. The Java section even shows the basics of using stored procedures with Hibernate and Spring.
After that, you'll be greeted with a 110 page medley of options to help you optimize your MySQL stored programs. The subject of tuning your SQL is addressed over the course of three chapters, from basic through advanced tuning topics. Additional optimization techniques such as reducing network traffic with stored programs, optimizing loops, recursion, cursors, trigger overhead and more are found in the final chapter of this section.
The book closes out with a chapter on best practices in MySQL stored program development. MySQL Stored Procedure Programming has earned a space on the MySQL shelf of my technical library. It's a fine book that will help you take your MySQL programming experience to another level.
Read all reviews
Media reviews
"...this book is the first one to offer database programmers a full discussion of the syntax, usage, and optimization of MySQL stored procedures, stored functions, and triggers—which the authors wisely refer to collectively as "stored programs," to simplify the manuscript...Overall,
MySQL Stored Procedure Programming is adeptly written, neatly organized, and exhaustive in its coverage of the topics. It is and likely will remain the premier printed resource for Web and database developers who want to learn how to create and optimize stored procedures, functions, and triggers within MySQL. "
-- Michael J. Ross,
Web Developer,
Slashdot.org
"Stored procedures are a major puzzle piece in allowing MySQL to be used in enterprise applications. In applications of such complexity, there are many advantages of putting logic back into the database. This books is THE book on MySQL 5 stored procedures."
-- Edward Tanguay,
Edward Tanguay's Web Developer Site
"I didn't honestly believe a book could be written on this topic that wouldn't be too dry. But Guy and Steven show the depth of the subject and make the material available to readers. It was a wonderful read."
--Brian Aker, Director of Architecture, MySQL AB
"The authors have an excellent grasp of the subject matter. I found the material easy to read, with lots of code examples. MySQL users should find this book an excellent resource."
--Arjen Lentz, Community Relations Manager, MySQL AB
"Guy and Steven have provided MySQL devlopers with a gem. They not only cover the nuts and bolts of writing stored procedures in MySQL, but also provide sound advice on designing database applications in the real world. In addition, they write with a sense of humor that makes the book a joy to read."
--James Cooper, Technology Consultant, Seattle, WA
Read all reviews