O'Reilly logo

Oracle PL/SQL Best Practices by Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to Use This Book

My primary goal in writing this book was to create a resource that would make a concrete, noticeable difference in the quality of the PL/SQL code you write. To accomplish this, the book needs to be useful and usable not just for general study, but also for day-to-day, program-to-program tasks. It also needs to be concise and to the point. A 1,000-page text on best practices would be overwhelming, intimidating, and hard to use.

The result is this relatively brief (I consider any publication under 200 pages a major personal accomplishment!), highly structured book. I recommend that you approach Oracle PL/SQL Best Practices as follows:

  1. Read Section P.3. Some of the best practices in this book—whole chapters, in fact—will have a much higher impact than others on the quality and efficiency of your code. If you find that your current practices (or those of your organization) are far from the mark, then you will have identified your priorities for initial study.

  2. Skip to Appendix A and peruse the best practice titles from each chapter. If you have been programming for any length of time, you will probably find yourself thinking: “Yes, I do that,” and “Uh-huh, we’ve got that one covered.” Great! I would still encourage you to read what I’ve got to say on those topics, as you might be able to deepen your knowledge or learn new techniques. In any case, a quick review of the appendix will allow you to identify areas that are new to you, or perhaps strike a chord, as in “Oh my gosh, that program I wrote last week does exactly what Steven says to avoid. Better check that out!”

  3. Dive into individual chapters or best practices within chapters. Read a best practice, wrestle with it, if necessary, to make sure that you really, truly agree with it. And then apply that best practice. This isn’t an academic exercise. You will only truly absorb the lesson if you apply it to your code—if you have a problem or program that can be improved by the best practice.

If you are new to programming or new to PL/SQL, you will certainly also benefit greatly from a cover-to-cover reading of the text. In this case, don’t try to fully absorb and test out every best practice. Instead, read and think about the best practices without the pressure of applying each one. When you are done, try to picture the best practices as a whole, reinforcing the following themes:

  • I want to write code that I—and others—can easily understand and change as needed.

  • The world is terribly complex, so I should strive to keep my code simple. I can then meet that complexity through carefully designed interaction between elements of my code.

Then you will be ready to go back to individual chapters and deepen your understanding of individual best practices.

The other crucial way to take advantage of this book is to use the code provided on the companion web site. See Section P.4 for detailed information on the software that will help you bring your best practices to life.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required