Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »



Procedural Programming using SQL

The Altibase PSM (Persistent Stored Module) provides control flow statements and exception handlers so that procedural programming can be conducted using SQL statements.

Performance

When a client sequentially executes multiple SQL statements, it must send each SQL statement individually and wait for the result before sending the next statement.

This increases the amount of time and expense that is required for communication between the server and client.

In contrast, a program that is authorized such that it uses stored procedures need to communicate with the server only one time so as to execute multiple SQL statements,

because the client only needs to call one stored procedure comprising several SQL statements.

Therefore, using stored procedures reduces communication costs, and additionally reduces the burden associated with type conversion when different data types are used on the server and client applications.

Modularity

All of the SQL operations required to conduct one business action can be gathered together and modularized in the form of a single stored procedure.

Easily Maintained Source Code

Because stored procedures reside in the database server, when business logic changes, only the stored procedures need to be changed, there is no need to update client programs distributed among multiple machine.

Sharing and Productivity

Stored procedures are stored in the database, which means that one user can execute another user's stored procedures, as long as a user has been granted proper access privileges.

Moreover, because stored procedures can be called from within other stored procedures, when the need arises for a new business process that is based on an existing business process,

 the stored procedure for the new business process has only to call the stored procedure for the existing business process, thereby eliminating redundancy and increasing productivity.

  • No labels