User-Defined Functions - IBM i series Handbook

Eserver
Hide thumbs Also See for i series:
Table of Contents

Advertisement

Operating System/400 (5722-SS1)

User-defined Functions

SQL now lets you define your own functions to use within SQL itself. This saves you time in
reusing common building blocks that you develop yourself. User-defined functions are
necessary building blocks to support the database extenders (extensions to support rich text
and multimedia search and manipulation) currently supported on DB2 UDB for iSeries.
Declarative Referential Integrity
Provides SQL database integrity support intrinsic to the database, eliminating the need to
code integrity constraints into each application program. This support ensures database
consistency by preventing conflicting data from being entered into the database.
User-accessible Logs
Journal entries (that is, records of database changes) can be searched and viewed
interactively, and may be retrieved by a user program for further processing or analysis. This
can lead to improved security or database integrity and is also an important component or
open access to the database.
Column-level Security
Access to individual table columns can be controlled for each user. Row-level locking
individual records (such as, records) are locked from simultaneous, conflicting access as
appropriate to the type of processing being done. Using commitment control, the user can
define a group of records all of whose locks are held until the user application declares a
multiple-change transaction complete.
Stored Procedures
Provides the ability to distribute the application workloads between clients and servers. The
ability to split an application program by executing the processing logic on the server and the
presentation logic on the client can provide increased performance over traditional requester
access. These improvements can be dramatic for applications requiring intermediate
processing of data, which can be performed at the server locally, instead of remotely at the
client.
Triggers
Provides for automatic program/procedure execution, based on user specified rules, before
or after database modifications.
Outer Join
The Outer Join function is another SQL standard compliant function that can improve both
query performance and function. Performance is enhanced with a syntax that allows SQL
459
Operating System/400 (5722-SS1)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents