Building High-Performance Web Applications with PHP, Perl, Python, Java and .Net

ISBN: 0596100892

Pages: 610

Publisher: O’Reilly

Topic: MySQL

Rating: 5 out of 5 – (5 out of 5)

Buy Now from Amazon

Since MySQL version 5 you can now store sql procedures, functions and triggers in the MySQL database. MySQL Stored Procedure Programming is a book dedicated to teaching you the new functionality. The actual syntax of the MySQL stored procedures very much reminds me of the syntax used in the Oracle database, so if you are already familiar with Oracle procedures, functions and triggers you should have no problems with the MySQL versions. The only new areas you will have to learn is some new commands and how to handle certain error exceptions.

Part 1 of MySQL Stored Procedure Programming begins by teaching you the basic fundamentals of stored procedure progamming such as the datatypes involved and what code you can actually put in stored procedures. It then tells you about using SQL statements within procedures and how to handle errors which may occur.

Part 2 of MySQL Stored Procedure Programming deals with Stored Program Construction such as creating stored programs and how to edit existing stored programs. Within this part are chapters specifically on transaction management and how to deal with savepoints. There are also chapters solely on stored functions and database triggers.

One of the most important areas I considered, was not just writing stored programs in MySQL, but about how you then actually call the function or procedure from within programming languages. It’s good to know that this is covered in Part 3 where there is a separate chapter about using MySQL Stored Programs with PHP, Java, Perl, Python and .Net.

The final part of MySQL Stored Procedure Programming covers how to make sure you have optimised your stored programs by tuning the stored programs and the SQL within the procedure, function or trigger. The chapters within this final part cover basic SQL tuning, advanced SQL tuning and best practices for creating and administering stored programs.

MySQL Stored Procedure Programming appears to be the definitive book on creating and maintaining procedures, trigger and functions in MySQL. The good thing about the book is that it does not advise you to start moving all your logic code straight into stored procedures as some code may not benefit from being stored in the database, but the book will tell you all the advantages and disadvantages of storing your code in the MySQL database, so you will know when to use stored programming and when not to.

If you want to learn how to program and use stored procedures, functions or triggers in MySQL then I can definitely recommend this book as I think it will teach you everything you need to know and it will have you writing MySQL procedures, functions and triggers in no time at all.

MySQL Stored Procedure Programming Book Review