Oracle8i Application Developer's Guide - Object-Relational Features
Release 2 (8.1.6)

Part Number A76976-01




Go to next page


Title and Copyright Information

Send Us Your Comments


1 Introduction to Oracle Objects

The Nuts and Bolts of Oracle Objects
The Object-Relational Model
Object Types
Object Tables
Object Views
REF Datatype
An Example of an Object-Oriented Model

2 Managing Oracle Objects

Using Object Types and References
Null Objects and Attributes
Default Values for Objects and Collections
Constraints for Object Tables
Indexes for Object Tables and Nested Tables
Triggers for Object Tables
Rules for REF Columns and Attributes
Name Resolution
Method Calls without Arguments
Using Collections
Querying Collections
Collection Unnesting
DML on Collections
Privileges on Object Types and Their Methods
System Privileges
Schema Object Privileges
Using Types in New Types or Tables
Privileges on Type Access and Object Access
Dependencies and Incomplete Types
Completing Incomplete Types
Type Dependencies of Tables
Import/Export/Load of Object Types

3 Object Support in Oracle Programmatic Environments

Oracle Call Interface (OCI)
Associative Access in OCI Programs
Navigational Access in OCI Programs
Object Cache
Building an OCI Program that Manipulates Objects
Associative Access in Pro*C/C++
Navigational Access in Pro*C/C++
Converting Between Oracle Types and C Types
Oracle Type Translator (OTT)
Oracle Objects For OLE (for Visual Basic, Excel, ActiveX, Active Server Pages)
Representing Objects in Visual Basic (OraObject)
Representing REFs in Visual Basic (OraRef)
Representing VARRAYs and Tables in Visual Basic (OraCollection)
Java: JDBC, Oracle SQLJ, and JPublisher
JDBC Access to Oracle Object Data
SQLJ Access to Oracle Object Data
Using JPublisher to Create Java Classes for JDBC and SQLJ Programs

4 Applying an Object Model to Relational Data

Why to Use Object Views
Defining Object Views
Using Object Views in Applications
Nesting Objects in Object Views
Identifying Null Objects in Object Views
Using Nested Tables and Varrays in Object Views
Specifying Object Identifiers for Object Views
Creating References to View Objects
Modelling Inverse Relationships with Object Views
Updating Object Views
Updating Nested Table Columns in Views
Using INSTEAD-OF Triggers to Control Mutating and Validation
Applying the Object Model to Remote Tables
Defining Complex Relationships in Object Views
Tables and Types to Demonstrate Circular View References
Creating Object Views with Circular References

5 Design Considerations for Oracle Objects

Representing Objects as Columns or Rows
Column Object Storage
Row Object Storage in Object Tables
Performance of Object Comparisons
Storage Considerations for Object Identifiers (OIDs)
Storage Size of REFs
Integrity Constraints for REF Columns
Performance and Storage Considerations for Scoped REFs
Indexing Scoped REFs
Speeding up Object Access using the WITH ROWID Option
Viewing Object Data in Relational Form with Unnesting Queries
Storage Considerations for Varrays
Performance of Varrays vs. Nested Tables
Nested Tables
Nested Table Storage
Nested Table Indexes
Nested Table Locators
Optimizing Set Membership Queries
DML Operations on Nested Tables
Nesting Collections within other Collections
Choosing a Language for Method Functions
Static Methods
Writing Reusable Code using Invoker Rights
Function-Based Indexes on the Return Values of Type Methods
New Object Format in Release 8.1
Replicating Object Tables and Columns
Consequences of the Oracle Inheritance Implementation
Simulating Inheritance
Constraints on Objects
Type Evolution
Performance Tuning
Parallel Queries with Oracle Objects

6 Advanced Topics for Oracle Objects

Storage of Objects
Leaf-Level Attributes
How Row Objects are Split Across Columns
Hidden Columns for Tables with Column Objects
Internal Layout of Nested Tables
Internal Layout of VARRAYs
Object Identifiers
OCI Tips and Techniques for Objects
Initializing an OCI Program in Object Mode
Creating a New Object
Updating an Object
Deleting an Object
Controlling Object Cache Size
Retrieving Objects into the Client Cache (Pinning)
How to Choose the Locking Technique
Flushing an Object from the Object Cache
Pre-Fetching Related Objects (Complex Object Retrieval)
Demonstration of OCI and Oracle Objects
Using the OCI Object Cache with View Objects
Partitioning Tables that Contain Oracle Objects
Parallel Query with Object Views
How Locators Improve the Performance of Nested Tables

7 Frequently Asked Questions about Programming with Oracle Objects

General Questions about Oracle Objects
Are the object-relational features a separate option?
What are the design goals of Oracle8i Object-Relational & Extensibility technologies?
What are the key features in Oracle8i Object-Relational Technology?
What are the new Object-Relational features in Oracle8i?
Object Types
What is structured data?
Where are the user-defined types, user-defined functions, and abstract data types?
What is an object type?
Why are object types useful?
How is object data stored and managed in Oracle8i?
Is inheritance supported in Oracle8i?
Object Methods
What language can I use to write my object methods?
How do I decide between using PL/SQL and Java for my object methods?
When should I use external procedures?
What are definer and invoker rights?
Object References
What is an object reference?
When should I use object references? How are they different from foreign keys?
Can I construct object references based on primary keys?
What is a scoped REF and when should I use it?
Can I manipulate objects using object references in PL/SQL and Java?
What kinds of collections are supported by Oracle8i?
How do I decide between using varrays and nested tables for modeling collections?
Do Oracle8i Objects support collections within collections?
What is a collection locator?
What is collection unnesting?
Object Views
What are the differences between object views and object tables?
Are object views updateable?
Object Cache
Why do we need the object cache?
Does the object cache support object locking?
Large Objects (LOBs)
How can I manage large objects using Oracle8i?
User-Defined Operators
What is a user-defined operator?
Why are user-defined operators useful?

8 A Sample Application using Object-Relational Features

A Purchase Order Example
Implementing the Application Under The Relational Model
Entities and Relationships
Creating Tables Under the Relational Model
Inserting Values Under the Relational Model
Querying Data Under The Relational Model
Updating Data Under The Relational Model
Deleting Data Under The Relational Model
Limitations of a Purely Relational Model
The Evolution of the Object-Relational Database System
Implementing the Application Under The Object-Relational Model
Defining Types
Method Definitions
Creating Object Tables
Object Datatypes as a Template for Object Tables
Object Identifiers and References
Object Tables with Embedded Objects
Manipulating Objects Through Java
Using oracle.sql.* Classes (Weak Typing)
Using Strong Typing (SQLData or CustomDatum)
Manipulating Objects with Oracle Objects for OLE
Selecting Data
Inserting Data
Updating Data
Calling a Method Function


Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.