IBM Licensed Programs: Database Products
546 AS/400e System Handbook
Many users of RDBMSs are moving toward nontraditional, object applications, requiring
support for a wider variety of real-world data. Examples include more effective handling of
text, voice, and image data within RDBMSs. This trend has been accelerated by client/server
tools and fourth-generation languages (4GLs) with powerful user interfaces for nontraditional
data.
DB2 DataJoiner offers extensive support for nontraditional applications as described in the
following list in addition to providing traditional application support that is fully integrated
within the database architecture:
• Large Objects (LOBs): Large object support allows multimedia objects such as
documents, video clips, images, and sound recordings to be stored in any data source
(which support LOBs, like DB2 UDB) and manipulated like other database objects.
The size of any one LOB can range up to 2 GB.
A powerful set of built-in functions, such as search, substring, and concatenation, are
supported for LOBs. Additional functions can be defined any time by means of
user-defined functions (UDFs).
• Global User-Defined Types (UDTs): Global UDTs allow users to define new data
types across multi-vendor data sources, which are represented in the DB2 DataJoiner
database using built-in types. For example, a user can define two currency types:
CDOLLAR data type for Canadian dollars and USDOLLAR data type for U.S. dollars.
These types are distinct in the sense that they should not be directly compared to one
another or to the DECIMAL type, although the DECIMAL type might be chosen for the
internal representation of both UDTs in the database.
Using DB2 DataJoiner in the above example with the CDOLLAR data type on DB2 and
USDOLLAR data type on Oracle, DataJoiner would invoke strong type checking to alert
the program to a type mismatch, that is, that the two currency types are of conflicting
types without the proper exchange rate conversion.
UDTs, like built-in types, can be used for columns of tables as well as function
parameters, including user-defined functions (UDFs). For example, a user can define a
data type such as ANGLE (which varies between 1 and 360) and a set of UDFs to act on
it, such as SINE, COSINE, and TANGENT.
• Global User-Defined Functions (UDFs): Application developers often want to create
their own suite of functions specific to their application or domain. Global UDFs make
this possible, expanding the scope of DB2 DataJoiner to include customized business
or scientific functions that span multi-vendor data.
For example, a retail store could define a PRICE data type for tracking the cost of items it
sells. This store might also want to define a SALES_TAX function, which would use a
given price value as input, compute the applicable sales tax, and return this data to the
application.