Oracle PL/SQL Best Practices

Steven Feuerstein (2007)
Review date: October 2009

Jasper, Deleware, and Lizbeth are a software development team working for a company that provides flimsy excuses. Under careful management from Sunita, they make mistake after mistake, that this book analyzes and corrects. These characters keep recurring chapter after chapter, and make a nice contrast to other similar books.

After an introductory chapter, the need for best practices is motivated. Then follow seven chapters, whose contents really match their names.

"Life after compilation" is about testing, debugging and tracing. Then we have three equally creatively named chapters about variables, conditionals, and exceptions followed by three more on using (or avoiding) SQL, procedures, triggers, and functions, and finally optimization.


By reading and reviewing this book, I really stepped out of my comfort zone. I've been maintaining some PL/SQL code for some years, sporadically, luckily, and wanted to read how to do it properly.

To be honest, my initial feeling was that of a wtf. Talking about best practices was fine, kicking in open doors, but then came the author's workflow model for software development, and then came advice about a sort-of-or-maybe-not TDD approach, followed by some statement from the author claiming that he really isn't a particularly good programmer. At that point I was ready to agree.

However, I kept pushing on and the book got better. The author switched from trying to explain software development and went down to the core of his expertise: PL/SQL. This is where I changed my mind about the book. It is well written and very clearly structured. In contrast to some books, that try to put everything in every chapter, this one is clear and consistent. The characters (the unfortunate software team) are used consequently and in good proportions.

As for the technical advice and PL/SQL specific contents, I have to say that the book is out of my league, and that I will not pass judgment. I simply don't know what practices and standards the PL/SQL developers of today follow, and what difficulties they encounter. In general, I'd say that the workflows, tools and problems feel a bit outdated. Reading some parts of this book is like reading something written in the 80's about BASIC for Commodore 64. There are gems though: few books these days treat fundamentals such as branching and conditionals at a detailed enough level. Chapter 5 of this book does just that, but it also contains some "simplifications" that I don't really agree with. Life goes on.

Another good thing in this book is the emphasis on SQL being bad. Being a poor PL/SQL programmer (if being one at all), I always thought that SQL was supposed to live closely to the PL/SQL program. The author argues convincingly that this is not the case, and provides a good discussion about what is hard coding and what not. I'd say that this is the most insightful material I've read on the topic . Worth reading. Then there are other surprises, such as an explanation of that business rules rules should be implemented as close to the database as possible... Preferably in triggers. This is where I started feeling unqualified to pass judgment on the technical contents.

As often, I manged to find an annoying habit of the author; in this case the compulsory behavior to refer to his own work and tools. Irritating, but that's all.

To sum up... Don't let this author be your TDD mentor, in fact, keep him away from everything that has to do with the development process. Do take his advice on some old school stuff and PL/SQL.

The above makes this book a "reading optional".

Who should read this book

If you're doing procedural programming in PL/SQL, and have done so for the last twenty years, the contents of this book will sure come in handy.


  • 2015-09-29

    It's been almost one and a half year since I reviwed a book! I've been too absorbed by Writing my own. Anyway, I'm back with Jeff Patton's relatively...
  • 2014-01-04

    New category! Performance! Reviewed The Every Computer Performance Book. Check it out!
  • 2013-09-10

    Reviewed a book that' slightly less technical, but much more fun to read. It's I.T. Confidential.
  • 2013-08-13

    Reviewed yet another book on Visual Studio 2012 and TFS. I also created a "Microsoft" category and moved the other TFS book there from the "Tools"...
  • 2013-08-05

    Updated the FAQ. Included information about getting a book reviewed.