Unformatted text preview:

Oracle Database Application Developer s Guide Object Relational Features 10g Release 1 10 1 Part No B10799 01 December 2003 Oracle Database Application Developer s Guide Object Relational Features 10g Release 1 10 1 Part No B10799 01 Copyright 1996 2003 Oracle Corporation All rights reserved Contributors Geeta Arora Eric Belden Chandrasekharan Iyer Geoff Lee Anand Manikutty Valarie Moore Magdi Morsi Helen Yeh Adiel Yoaz Qin Yu The Programs which include both the software and documentation contain proprietary information of Oracle Corporation they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright patent and other intellectual and industrial property laws Reverse engineering disassembly or decompilation of the Programs except to the extent required to obtain interoperability with other independently created software or as specified by law is prohibited The information contained in this document is subject to change without notice If you find any problems in the documentation please report them to us in writing Oracle Corporation does not warrant that this document is error free Except as may be expressly permitted in your license agreement for these Programs no part of these Programs may be reproduced or transmitted in any form or by any means electronic or mechanical for any purpose without the express written permission of Oracle Corporation If the Programs are delivered to the U S Government or anyone licensing or using the programs on behalf of the U S Government the following notice is applicable Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are commercial computer software and use duplication and disclosure of the Programs including documentation shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement Otherwise Programs delivered subject to the Federal Acquisition Regulations are restricted computer software and use duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52 227 19 Commercial Computer Software Restricted Rights June 1987 Oracle Corporation 500 Oracle Parkway Redwood City CA 94065 The Programs are not intended for use in any nuclear aviation mass transit medical or other inherently dangerous applications It shall be the licensee s responsibility to take all appropriate fail safe backup redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes and Oracle Corporation disclaims liability for any damages caused by such use of the Programs Oracle is a registered trademark and Oracle9i Oracle Store PL SQL Pro C Pro C C and SQL Plus are trademarks or registered trademarks of Oracle Corporation Other names may be trademarks of their respective owners Contents Send Us Your Comments xiii Preface xv Audience xvi Organization xvi Related Documentation xvii Conventions xviii Documentation Accessibility xxi What s New in Object Relational Features xxiii Oracle 10g Release 1 10 1 New in Object Relational Features xxiv Oracle9i Release 2 9 2 New in Object Relational Features xxiv Oracle9i Release 1 9 0 1 New in Object Relational Features xxv 1 Introduction to Oracle Objects About Oracle Objects Advantages of Objects Key Features of the Object Relational Model Core Database Key Features Object Types Objects Object Methods Type Inheritance Type Evolution 1 2 1 2 1 3 1 4 1 4 1 5 1 6 1 7 1 7 iii Object Tables Row Objects and Column Objects Object Views References Collections Language Binding Features 2 Basic Components of Oracle Objects SQL Object Types and References Null Objects and Attributes Character Length Semantics Constraints for Object Tables Indexes for Object Tables Triggers for Object Tables Rules for REF Columns and Attributes Name Resolution When Table Aliases Are Required Restriction on Using User Defined Types with a Remote Database Object Methods Member Methods Methods for Comparing Objects Map Methods Order Methods Guidelines for Comparison Methods Comparison Methods in Type Hierarchies Static Methods Constructor Methods External Implemented Methods Inheritance in SQL Object Types Types and Subtypes FINAL and NOT FINAL Types and Methods Creating Subtypes NOT INSTANTIABLE Types and Methods Inheriting Overloading and Overriding Methods Overloading Methods iv 1 8 1 9 1 9 1 9 1 12 1 13 2 2 2 2 2 3 2 4 2 5 2 5 2 6 2 6 2 7 2 8 2 8 2 9 2 10 2 10 2 12 2 13 2 13 2 13 2 14 2 15 2 15 2 15 2 17 2 18 2 19 2 20 2 21 Redefining Methods Restrictions on Overriding Methods Dynamic Method Dispatch Substituting Types in a Type Hierarchy Column and Row Substitutability Using OBJECT VALUE and OBJECT ID with Substitutable Rows Subtypes Having Supertype Attributes REF Columns and Attributes Collection Elements Creating Subtypes After Creating Substitutable Columns Dropping Subtypes After Creating Substitutable Columns Turning Off Substitutability in a New Table Constraining Substitutability Modifying Substitutability Restrictions on Modifying Substitutability Assignments Across Types Objects and REFs to Objects Collection Assignments Comparisons of Objects REF Variables and Collections Comparing Object Instances Comparing REF Variables Functions and Operators Useful with Objects CAST CURSOR DEREF IS OF type REF SYS TYPEID TABLE TREAT VALUE 3 2 21 2 22 2 23 2 24 2 25 2 26 2 27 2 28 2 28 2 28 2 29 2 29 2 30 2 31 2 31 2 32 2 32 2 34 2 34 2 34 2 35 2 35 2 35 2 36 2 36 2 36 2 38 2 38 2 39 2 39 2 41 Support for Collection Datatypes Creating Collection Datatypes 3 2 Creating an Instance of a VARRAY or Nested Table 3 2 v Constructor Methods for Collections Varrays Nested Tables Specifying a Tablespace When Storing a Nested Table Varray Storage Increasing the Size and Precision of VARRAYs and Nested Tables Increasing VARRAY Limit Size Creating a Varray Containing LOB References Multilevel Collection Types Nested Table Storage Tables for Multilevel Collection Types Assignment and Comparison of Multilevel Collections Constructors for Multilevel Collections Operations on Collection Datatypes Querying Collections Nesting Results of Collection Queries Unnesting Results of Collection Queries Unnesting Queries Containing Table Expression Subqueries Unnesting Queries with Multilevel Collections Performing DML Operations on Collections Performing DML on Multilevel Collections Comparisons of Collections Equal and Not Equal Comparisons In Comparisons Subset of Multiset


View Full Document

USC CSCI 585 - b10799

Loading Unlocking...
Login

Join to view b10799 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view b10799 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?