My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
MySQL Stored Procedure Programming
By
Guy Harrison
,
Steven Feuerstein
March 2006
Pages: 636
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Stored Programming Fundamentals
Chapter 1
Introduction to MySQL Stored Programs
What Is a Stored Program?
A Quick Tour
Resources for Developers Using Stored Programs
Some Words of Advice for Developers
Conclusion
Chapter 2
MySQL Stored Programming Tutorial
What You Will Need
Our First Stored Procedure
Variables
Parameters
Conditional Execution
Loops
Dealing with Errors
Interacting with the Database
Calling Stored Programs from Stored Programs
Putting It All Together
Stored Functions
Triggers
Calling a Stored Procedure from PHP
Conclusion
Chapter 3
Language Fundamentals
Variables, Literals, Parameters, and Comments
Operators
Expressions
Built-in Functions
Data Types
MySQL 5 "Strict" Mode
Conclusion
Chapter 4
Blocks, Conditional Statements, and Iterative Programming
Block Structure of Stored Programs
Conditional Control
Iterative Processing with Loops
Conclusion
Chapter 5
Using SQL in Stored Programming
Using Non-SELECT SQL in Stored Programs
Using SELECT Statements with an INTO Clause
Creating and Using Cursors
Using Unbounded SELECT Statements
Performing Dynamic SQL with Prepared Statements
Handling SQL Errors: A Preview
Conclusion
Chapter 6
Error Handling
Introduction to Error Handling
Condition Handlers
Named Conditions
Missing SQL:2003 Features
Putting It All Together
Handling Stored Program Errors in the Calling Application
Conclusion
Stored Program Construction
Chapter 7
Creating and Maintaining Stored Programs
Creating Stored Programs
Editing an Existing Stored Program
SQL Statements for Managing Stored Programs
Getting Information About Stored Programs
Conclusion
Chapter 8
Transaction Management
Transactional Support in MySQL
Defining a Transaction
Working with Savepoints
Transactions and Locks
Transaction Design Guidelines
Conclusion
Chapter 9
MySQL Built-in Functions
String Functions
Numeric Functions
Date and Time Functions
Other Functions
Conclusion
Chapter 10
Stored Functions
Creating Stored Functions
SQL Statements in Stored Functions
Calling Stored Functions
Using Stored Functions in SQL
Conclusion
Chapter 11
Triggers
Creating Triggers
Using Triggers
Trigger Overhead
Conclusion
Using MySQL Stored Programs in Applications
Chapter 12
Using MySQL Stored Programs in Applications
The Pros and Cons of Stored Programs in Modern Applications
Advantages of Stored Programs
Disadvantages of Stored Programs
Calling Stored Programs from Application Code
Conclusion
Chapter 13
Using MySQL Stored Programs with PHP
Options for Using MySQL with PHP
Using PHP with the mysqli Extension
Using MySQL with PHP Data Objects
Conclusion
Chapter 14
Using MySQL Stored Programs with Java
Review of JDBC Basics
Using Stored Programs in JDBC
Stored Programs and J2EE Applications
Using Stored Procedures with Hibernate
Using Stored Procedures with Spring
Conclusion
Chapter 15
Using MySQL Stored Programs with Perl
Review of Perl DBD::mysql Basics
Executing Stored Programs with DBD::mysql
Conclusion
Chapter 16
Using MySQL Stored Programs with Python
Installing the MySQLdb Extension
MySQLdb Basics
Using Stored Programs with MySQLdb
A Complete Example
Conclusion
Chapter 17
Using MySQL Stored Programs with .NET
Review of ADO.NET Basics
Using Stored Programs in ADO.NET
Using Stored Programs in ASP.NET
Conclusion
Optimizing Stored Programs
Chapter 18
Stored Program Security
Permissions Required for Stored Programs
Execution Mode Options for Stored Programs
Stored Programs and Code Injection
Conclusion
Chapter 19
Tuning Stored Programs and Their SQL
Why SQL Tuning Is So Important
How MySQL Processes SQL
SQL Tuning Statements and Practices
About the Upcoming Examples
Conclusion
Chapter 20
Basic SQL Tuning
Tuning Table Access
Tuning Joins
Conclusion
Chapter 21
Advanced SQL Tuning
Tuning Subqueries
Tuning "Anti-Joins" Using Subqueries
Tuning Subqueries in the FROM Clause
Tuning ORDER and GROUP BY
Tuning DML (INSERT, UPDATE, DELETE)
Conclusion
Chapter 22
Optimizing Stored Program Code
Performance Characteristics of Stored Programs
How Fast Is the Stored Program Language?
Reducing Network Traffic with Stored Programs
Stored Programs as an Alternative to Expensive SQL
Optimizing Loops
IF and CASE Statements
Recursion
Cursors
Trigger Overhead
Conclusion
Chapter 23
Best Practices in MySQL Stored Program Development
The Development Process
Coding Style and Conventions
Variables
Conditional Logic
Loop Processing
Exception Handling
SQL in Stored Programs
Dynamic SQL
Program Construction
Performance
Conclusion
Colophon
Return to
MySQL Stored Procedure Programming