|
To support the entire life-cycle of database
applications, Oracle9i Object-Relational Technology now supports
Java object persistence with SQLJ object types and type evolution
features. These features are indispensable in supporting the
normal operations of any object-relational database applications.
Java
Object Persistence with SQLJ Object Types
SQLJ object types in Oracle9i
provides a simple yet powerful mechanism to support Java object
persisntence. Java applications can now provide object persistence
by creating corresponding SQL object types in the database.
Such SQL types are called SQL types of
Language Java, or SQLJ object types. They can be used
as the type of an object table, an attribute of a type, or
a column of a relational table. You can navigationally access
objects of such types through object references. Furthermore,
schema objects of SQLJ object types can be queried and manipulated
with SQL.
SQLJ types are created with a CREATE
TYPE statement as other user-defined SQL types. For
SQLJ types, two special elements are added to the CREATE
TYPE statement:
- An
EXTERNAL
NAME phrase, used to identify the Java counterpart
for each SQLJ attribute and method and the Java class corresponding
to the SQLJ type itself
- A
USING
clause, to specify how the SQLJ type is to be represented
to the server. The USING clause specifies the
interface used to retrieve a SQLJ type and the kind of storage.
Type
Evolution
The usage of object type
enables the user to evolve their business logic captured in
the behavior of the type. Type Evolution is a mechanism that
allows the user to change the type and propagate these changes
to other schema objects that reference the modified type.
The schema objects that may reference a type include other
types, subtypes, row objects, column objects, program units
(packages, functions, procedures), views, functional indexes,
or triggers.
These type evolution changes are either structural
or non-structural. Structural changes are those affecting
the state of the object such as adding or dropping an attribute.
A non-structural change has no effect on the state of the
object. In Oracle9i, type evolution supports the following
comprehensive operations:
- Operation on a type attribute:
- Add an attribute to a type.
- Drop an attribute from a type.
- Modify the type of an attribute by
increasing its length, precision, or scale.
- Operation on a type method:
- Add a method to a type
- Drop a method from a type.
- Change the INSTANTIATABLE and FINAL property
of a SQL Object type.
- Support for explicit propagation of a type
change to its dependent types and tables
More Info
Oracle9i
Database Daily Features
|
 |