(Contents)(Previous)(Next)

DB Procedures

DB procedures are SQL-PL programs which are called from an application program like one SQL statement. A DB procedure can contain several SQL statements and the application developper can use the control structures provided by SQL-PL. So, for example, loops or branches can be programmed within a DB procedure.

Input parameters and output parameters can be defined which can be used to pass own values to the DB procedure or to return results from the DB procedure.

DB procedures are directly executed in the address space of the kernel, not that of the user. Thus communication overhead between application and database kernel is saved. The performance can be improved especially for client server configurations, because the kernel operates on another computer than the application.

With DB procedures, a common SQL access layer is provided on the server side which can be used by all application programs. Thus the user is given simple access to complex database operations.

Possible fields of applications are, e.g., the formulation of complex integrity rules for validity checks of values and the provision of operations on application objects (abstract data types). Modifications to these rules or operations can be done at a central place and must no longer be done for each individual application. This allows programs to be more clearly structured and to be more easily maintained.

Access can be simplified to a still greater extent by granting privileges. It is sufficient to grant the call privilege for a DB procedure. No privileges for the database objects addressed by the DB procedure are needed in addition.


(Contents)(Previous)(Next)