Skip to Main Content
Oracle PL/SQL Best Practices, 2nd Edition
book

Oracle PL/SQL Best Practices, 2nd Edition

by Steven Feuerstein
October 2007
Intermediate to advanced content levelIntermediate to advanced
292 pages
8h 38m
English
O'Reilly Media, Inc.
Content preview from Oracle PL/SQL Best Practices, 2nd Edition

Chapter 8. Playing with Blocks (of Code)

One of my greatest joys as a dad with a young child was to play blocks with my son, Eli. I very much enjoyed taking individual pieces of plastic or wood, and combining them together to create all sorts of structures. I think Eli did, too, but it is entirely possible that I was often the more excited of the two of us at making that tall, slim, stable tower (he was delighted more by knocking it down!).

What I have come to realize over the years is that writing software has many parallels to playing with blocks.

Applications are extremely complicated constructions, and this fact should come as no surprise. After all, an application is our attempt to capture a small slice of reality inside our virtual world of cyberspace, and the real world is incredibly complex (and always changing).

Furthermore, our brains can keep track of only so much information at once. And that’s why languages like PL/SQL allow us to build named subprograms (procedures and functions), and even group those elements together into packages and object types. Rather than write big blobs of spaghetti code that go on and on for thousands of lines, we can create smaller units of logic, each with its own name. We can then combine these individual units to implement more and more of the application requirements.

This chapter offers advice on how to play most effectively with blocks of PL/SQL code. It is divided into four main sections:

Best Practices for Parameters

Presents best practices ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Jonathan Gennick
Oracle PL/SQL Programming, Third Edition

Oracle PL/SQL Programming, Third Edition

Steven Feuerstein, Bill Pribyl
Oracle PL/SQL Programming, 5th Edition

Oracle PL/SQL Programming, 5th Edition

Steven Feuerstein, Bill Pribyl

Publisher Resources

ISBN: 9780596514105Supplemental ContentErrata Page