Oracle9i Object-Relational Technology
Feature Overview
Building on the solid foundation of its predecessor in Oracle8i, Oracle9i Object-Relational Technology introduces crucial new features to complete its object modeling and operational capabilities. For object model completeness, type inheritance and multi-level collections are now supported in the Oracle9i database server, along with their corresponding API support in PL/SQL, JDBC, OCCI (Oracle C++ Call Interface)/OCI and Pro*C++. Furthermore, to empower DBAs in managing object-relational databases, utilities are introduced or enhanced to fully support operational needs. Most notable ones are the new type evolution and object replication features, as well as the much enhanced SQL*Loader® and import/export utilities. 

Designers can model the structures of real-world entities, as well as the operations that applications need to perform on these entities, by defining object types. Object types thus help extend the data-modeling capabilities beyond that are provided by built-in types such as NUMBER, DATE, or CHAR. Instances of object types can be stored in the rows and columns of Oracle9i database tables. Object data resides integrally with relational data on the Oracle9i server and provides powerful mechanisms to access data from 3GL host languages and client platforms, as well as being able to retrieve related data in highly efficient ways.

The Object-Relational Technology helps fulfill the Oracle9i promise of supporting highly efficient access to all users? data?regardless of data complexity, structure, or behavior. 

Objects Features 
The Oracle9i object-relational database provides the most complete solution to address the object functionality needs of the mainstream business market. It allows users to manage data complexity when developing applications for complicated business processes; to manage and manipulate any data type in a single data store; and to benefit from the industry?s most robust, scalable, and high-performance deployment platform. The specific features that deal with the objects capability are described below. 

Oracle Type System
The Object-Relational Technology provides support for user-defined object types, which can be used to model real-world entities. An object type has attributes, which reflect the entity?s structure, and methods, which implement the operations on it. Attributes can be built-in types or other object types. Methods are functions or procedures written in PL/SQL? or Java? at the server, or in external programming languages like C or C++, and are dispatched in a separate process from the server. Instances of object types can be stored as rows in tables (row objects), or as values in columns (column objects). 

Type Inheritance
The newly provided support of type inheritance is a fundamental concept in any object-oriented system. Type inheritance allows sharing similarities between types as well as extending their characteristics. The most important benefits of type inheritance are substitutability and dynamic method dispatch. Substitutability allows a value of  some subtype to be used where a supertype is expected. Oracle9i supports a multi-language (PL/SQL, C/C++, and Java) dynamic method dispatch capability. When a method is invoked on an object instance, it is dispatched to a specific implementation based on most specific type of the instance. 

Type Evolution
Changing a user-defined type is called type evolution. A user-defined type can be altered after it has been created by adding and dropping attributes, adding and dropping methods, etc. The most significant improvement in Oracle9i for type evolution is to propagate a change to its dependents, such as tables and views.

References
Oracle9i provides support for References to each row object. References are used to model inter-object relationships, and can be used as attributes of object types; they are essentially ?database pointers? to objects, useful for navigating among related objects. Using References to set up
easily-navigable, complex graph structures is particularly helpful in client-side object access. ?Dangling? references can be detected at the server and set to NULL. For each row object, Oracle9i creates a globally-unique Object Identifier. Object Identifiers capture references between row objects, and are automatically indexed for fast access. It is also possible to construct user-defined object identifiers, based on a primary key, in lieu of the system-generated key.

Multi-Level Collections
Oracle9i?s Object-Relational Technology also supports Collections?ordered and unordered?in the form of variable-length arrays and nested tables. Collections can consist of built-in types, object types, or references, and can be used as attributes of object types, where they serve as a powerful modeling construct for multi-valued attributes. Collections also enable the grouping of data for efficient, optimized access. Queries, cursors, and indexes are all supported on nested tables. New in Oracle9i, multi-level collections are supported to allow the elements of a collection to be collections themselves. There are also functions to ?unnest? nested tables so that complex collections can be flattened. For flexible memory resource management, applications can access a nested table both as a value and as a locator.

Object Views
RDBMS views provide multiple virtual tables on the same underlying relational data?and Object Views extend this idea. They allow for the synthesis of virtual objects from relational data. This enables the use of object-oriented features of the Object-Relational Technology with existing relational data.

The Object-Relational Technology provides object views as an extension of the basic relational view mechanism. In addition, object views are fully updateable. By using object views, relational data can be retrieved, updated, inserted, and deleted as if such data were stored as
objects. Object views can be constructed on both relational and object data, as well as other object views.

Object views provide the flexibility of multiple object schemas on the same relational or object data. By de-coupling the in-memory representation from persistent data, object views enable the in-memory object representation to be changed for different applications without changing the persistent data representation.

Using object views to group logically-related data can lead to better database performance. Object views also support INSTEAD-OF triggers that can be used for customizing regular data manipulation operations, such as insert, delete, and update.

Client-Side Cache
Applications are able to cache objects locally on client platforms and get easy navigational access to persistent referenceable objects. Complex object retrieval is also provided, enabling the transparent but configurable fetching of connected objects into the cache in one round trip. If the cache becomes full, objects are automatically aged out of the cache. The cache size, as well as the threshold for swapping, are tunable. Type description information on cached objects is also stored in the cache, which can be accessed by applications during run time.

Client-side cache provides very significant performance gains. If all the data used by an application is cached locally in client memory, access to such data is very fast, since network round-trip and disk I/O overheads are eliminated. The cache is also used for the transparent mapping of database objects to host-language objects, eliminating the need for applications to allocate or deal locate memory for accessing database objects. The cache supports object change detection, which can be used to implement optimistic locking schemes. The layout of objects in the cache is extensible to accommodate application- or tool-specific cache data management.

Object Type Translator and JPublisher
The Object Type Translator (OTT) and JPublisher utilities provide client-side mappings to object type schema by generating files containing C structs, C++ classes, or Java classes, using schema information from the Oracle data dictionary. These generated files can be used in host-language applications for transparent access to database objects.

Application Programming Interfaces

SQL
Extensions have been made to SQL?including new DDL?to create, alter, or drop object types; to store object types in tables; to create, alter, or drop object views; to create or drop indextypes; to create or drop operators; to bind operators to functions; and also to associate operators to indextypes. There are DML and query extensions to support object types, references, and collections.

PL/SQL
There are extensions to PL/SQL in the form of DDL and DML commands to create or manipulate object types. Object types can be defined as parameters and bind variables for PL/SQL procedures and methods. Object type methods can be implemented as PL/SQL functions, or as stored procedures. In addition, PL/SQL provides support for the creation and access of collections, as well as support for the creation and access of object views.

Oracle C++ Call Interface (OCCI) and Oracle Call Interface (OCI)
The Oracle9i Object-Relational Technology includes numerous support in the Oracle C++ Call Interface (OCCI) and its C language counter-part - Oracle Call Interface (OCI). It provides functions to bind object types in the server to C++ classes or C structs (generated by OTT) in an application to access objects in the server by using SQL-style statements (SELECT, INSERT, UPDATE) and functions to describe object types by accessing the metadata in an Oracle data dictionary.

Both OCCI and OCI provide a navigational interface for traversing objects on the client side. New functions allow for setting and modifying cache parameters to map Oracle DATE, VARCHAR, and NUMBER types to client-side equivalents, and to create and access object views. Oracle Call Interface has also been enhanced for scalability with objects, and contains optimizations to minimize client/server round-trips through complex object retrieval.

Oracle Objects for OLE
Oracle Objects? for OLE has object extensions that expose object types, references, and nested
tables, for example, to clients by means of a COM automation interface.

Java
The Oracle JDBC drivers support objects, type inheritance, multi-level collections, LOBs, and REFs. This can be used to write client programs with full access to server object data. As part of the server Java functionality, Java can also be an implementation choice for object type methods. Java classes can map to the new SQLJ Java object types, the stored Java objects can be queried by SQL. Objects can thus enable direct persistence for Java classes.

Integration with Relational Functionality
The Oracle9i Object-Relational Technology continues to support standard relational database functionality such as queries (SELECT?FROM?WHERE), fast commits, backup and recovery, scalable connectivity, row-level locking, read consistency, and parallel server, for example. Partitioning, parallel queries, SQL*Loader® support, and IMPORT/EXPORT support, are also available for objects.
 

Oracle9i Object-Relational Technology provides application developers with the full power of object-oriented approach, while offering DBAs with the same set of versatile utilities. Complex application development task becomes simpler with Oracle9i Object-Relational Technology. 

 
KEY FEATURES
  • Ability to define new object types in the database to model real-world business objects, including type inheritance hierarchy 
  • Ability to define collections of objects as multiple levels of variable arrays and nested tables
  • Ability to model complex inter-object relationships using references
  • Extension of the view mechanism as object views, which provides a uniform, updateable object metaphor over both relational and object data
  • Ability to evolve object types and their associated storage
  • A client-side cache for object data that provides fast in-memory access to objects, navigation between objects, and efficient complex-object retrieval
  • Ability to generate client-side mappings to object type schema by means of the Object Type Translator (for C++ and C code) and JPublisher (for Java code) 
  • Ability to define new types of indexes and new index structures
  • Ability to define new SQL operators
  • An interface to the optimizer for custom collection of statistics, as well as superior estimation of cost and selectivity
  • Multiple language interfaces to object functionality?SQL, PL/SQL, Java, XML, Oracle Call Interface, Oracle C++ Call Interface, and Oracle Objects for OLE
  • Integration with standard relational functionality
RELATED SUPPORT
  • Support for user-defined object IDs based on primary keys
  • Support for locators to nested tables; ability to define constraints on nested tables; ability to unnest nested tables; ability to define storage for variable arrays
  • Static methods in types, ability to run object methods under invokers? rights
  • Ability to enforce Reference integrity using ANALYZE
  • External procedure support for objects
  • Java as an implementation choice for object methods
  • Object change detection and no-wait locking in the client cache; ability to provide custom memory layouts for objects in the cache
  • OCIPro*C/C++, Java, and Oracle Objects for OLE support for object functionality
PERFORMANCE

Oracle9i Object-Relational technology provides performance-tuned facilities and APIs. 

  • Optimizations for nested tables, variable arrays, and object views?e.g., access to nested tables as locators
  • Storage of nested tables under index organization with key compression
  • Rationalizations in object memory and storage footprints lead to performance gains
  • Ten-fold performance improvements in JDBC access for object-relational data access
OPERATIONAL COMPLETENESS
  • Partitioning support for objects
  • Parallel query support for objects
  • SQL*Loader support for objects
  • Import/Export support for objects
  • Replication support of objects
Top of Page |Copyright and Corporate Info
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy