Routine Objects

Routine objects are the building blocks of a database application. Database Development tooling assists you in building the shell, or skeleton, for routine objects, and then provides tools to populate the body of the object with the appropriate SQL syntax.

Routine objects standardize actions performed by more than one application program. By coding the action once and storing it in the database for future use, applications need only execute the routine to achieve the desired result repeatedly. Because changes occur in only one place, all applications using the action automatically acquire the new functionality if the implementation of the action changes. When you create a routine object, it is automatically checked for correct syntax and stored in the system tables. The first time any application calls or fires a routine object, it is compiled from the system tables into the server's virtual memory and executed from there. User-defined functions and event handlers are similar to stored procedures with some differences.

Table 1. Routine object types
Procedural object type Description
Stored procedures Stored procedures are collections of SQL statements and optional control-of-flow statements stored under a name. They can use parameters to accept values and return values to the calling environment. Procedures can return result sets to the caller, or call other procedures. They greatly enhance the user's ability to write fast, efficient procedures because they are precompiled when first executed

You can develop the procedural objects that your database and server type support.

The basic workflow for developing routine objects includes:

Related concepts
Develop
Related tasks
Running a Routine Object
Creating a Launch Configuration for Routine Objects