Chapter 20. PL/SQL’s Runtime Architecture

As we discussed in Chapter 2, there are many different programmatic environments from which you can call a PL/SQL program, but there are only two places that you can find a PL/SQL runtime engine:

  • Inside the Oracle database server

  • On a client machine running Oracle’s Developer tools such as Oracle Forms Builder or Oracle Reports Builder

An application developer has a number of packaging and design decisions to make, such as:

  • Should I put code on the server, on the client, or both?

  • What’s better: an anonymous block, a top-level procedure, or a package?

  • Should server-side code use conventional compilation or native compilation?

  • Which client-side programs would be better stored in PL/SQL libraries rather than inside an Oracle Forms program?

You must also decide whether a program should run with the privileges of its owner (the definer rights model) or of the user who is running it (the invoker rights model).

Even to an experienced programmer, the “correct” answers to these questions are not always obvious. However, understanding something about the inner workings of the PL/SQL environment will help you make informed decisions. This chapter takes a closer look at PL/SQL’s internal runtime architecture. Our goal is to take you beyond mere packaging decisions, and assist you in improving the design and performance of your applications in many ways.

While the primary emphasis of this chapter is on those aspects of PL/SQL that are of interest ...

Get Oracle PL/SQL Programming, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.