Released last month by Oracle and trumpeted from Chris Jones’ blog, The Underground PHP and Oracle Manual is an excellent guide for anyone looking to work with these two technologies.

Short Version:

I’m not a fanboy for Oracle but this review will read like one. It’s hard to find anything to criticize in this book. It’s an easy read and it’s not burdened with unnecessary technical jargon. This is a book I will recommend to my friends who know Oracle and want to know more about PHP or visa-versa.

Long Version:

It’s really a bad time to be a book publisher for PHP. This is the second well written, freely available book announced recently and the first one I’ve had the chance to fully review. Books of this quality add to the community whether free or not. The fact that this one is made available to you at no charge simply enhances it’s value.

The authors, Chris Jones and Alison Holloway start it off right. They eschew the normal “History of the Internet” chapter and instead give you a primer on Oracle databases. They assume nothing of the reader and take you through the very basics in Oracle terminology. They also spend no small amount of space on introducing PHP. Their intent is obvious, whether you are an Oracle developer getting into PHP or a PHP developer getting into Oracle, they want to make sure you understand the vocabulary of the technologies. Normally, the first chapter of any good technical book can be skipped as fluff. In this case however, I recommend a thorough read of the first chapter as it truly does set the stage for the rest of the book.

Chapters 2-8 deal with getting everything installed. This is a soup to nuts guide to setting up a development environment. It’s almost a mini book in itself. In reality, if it had a chapter on CVS or SVN, it would be a complete guide. There is a good discussion on the different Oracle Extensions for PHP (OCI7, OCI8, PDO) and discusses the relative strengths and weakness of each. The authors go on to discuss database abstraction layers and give you links to get started with them as well.

The book guides you through downloading and installing Oracle-XE, the free version of Oracle. The book then dedicates chapters to Apache, Zend Core for Oracle and finally PHP. Each chapter gives you everything you need to know to get started with the respective technology.

Chapters 9 gets you connected to the Oracle database. It helps you understand the different types of connections you can make and walk you through the PHP code necessary to connect your script to an Oracle database. The latter part of the chapter does a good job of introducing tuning and debugging to someone with little or no Oracle experience.

Starting with Chapter 10, we get into the meat of the book, actually doing something with SQL. I said earlier that the book assumes nothing, that’s not entirely correct. The book assumes that you are a programmer and understand the basics of databases and programming logic. There is no chapter on database normalization or exactly what a SELECT statement does. It skips that for more interesting content like transactions and error handling. Chapters 10-12 deal with increasing more difficult concepts, each building on the last until by the end, you should have a firm grasp on the basics of talking to an Oracle database from PHP.

Chapters 13 and 14 are advanced topics and the chapters with the highest “ohh-ahh” factor. Chapter 13 deals with XML and how you can fetch data as XML from an Oracle database. Given PHP’s ability to process XML, this is a great fit and an interesting chapter. Chapter 14 deals with Globalization. Lots if i18n and l10n goodness packed into a few pages. Again, very advanced topic but Chris and Alison do a great job of making the complex sound simple.

From there the book gives you the usual list of resources, glossary and index. The normal wrap-up for any good technical book.

I absolutely hate posting a book review without giving some kind of critics because it leads to inflated egos on the part of the authors. So here’s my criticism of this book. It needs to be a book and not a PDF. Something I can carry with me out on the deck and read instead of carrying my laptop. That’s it, that’s best I can do.

=C=