Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · •...

22
Oracle9i: New Features for Developers Volume 1 Student Guide 30083GC11 Production 1.1 January 2002 D34298

Transcript of Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · •...

Page 1: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Oracle9i: New Features for Developers

Volume 1 • Student Guide

30083GC11Production 1.1January 2002D34298

Page 2: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Copyright © Oracle Corporation, 2002. All rights reserved.

This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable:

Restricted Rights Legend

Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988).

This material or any portion of it may not be copied in any form or by any means without the express prior written permission of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties.

If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with “Restricted Rights,” as defined in FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987).

The information in this document is subject to change without notice. If you find any problems in the documentation, please report them in writing to Education Products, Oracle Corporation, 500 Oracle Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free.

Oracle is a registered trademark and all references to Oracle and Oracle products are trademarks or registered trademarks of Oracle Corporation.

All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.

Author(s)Priya VennapusaCraig Hollister

Technical Contributorsand ReviewersBrian BoxxTaj ul IslamDan GabelLaslo CzinkoczkiAnna AtkinsonSarah JonesHelen RobertsonSander RekveldCraig DavisStefan LindbergJasmine RobayoThomas HoogerwerfMartin JensenBruce ErnstMatt TaylorJim WomackSusan KotsovlosGeeta AuroraSundeep AbrahamBarry TruteSandeepan BannerjeeMark ScardinaDiana LorentzUlrike SchwinnPeter Sharman

Publisher

May Lonn Chan-Villareal

Page 3: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface

Page 4: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led
Page 5: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface - 3

Profile

Before You Begin This Course

Before you begin this course, you should have the following qualifications:

• Thorough knowledge of Oracle8i database

Prerequisites

• Introduction to Oracle SQl and PL/SQL (41010GC13)

• Develop PL/SQL Program Units (41024GC14)

• Programming experience in an Oracle8i database environment

• Knowledge of object-oriented concepts

• Oracle8i: Managing Data (30062GC10)

• Oracle8i: SQL Statement Tuning Workshop (30061GC10)

• Advanced PL/SQL (40008GC11)

• Knowledge of developing programs in a language such as C, C++, or Java

How This Course Is Organized

Oracle9i: New Features for Developers is an instructor-led course featuring lecture and hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts and skills introduced.

Page 6: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface - 4

Related Publications

Oracle Publications

Introduction to Oracle SQl and PL/SQL

Develop PL/SQL Program Units

Oracle8i: Managing Data

Oracle8i: SQL Statement Tuning Workshop

Advanced PL/SQL

Additional Publications

• System release bulletins

• Installation and user’s guides

• read.me files

• International Oracle User’s Group (IOUG) articles

• Oracle Magazine

Page 7: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface - 5

Typographic Conventions

Typographic Conventions in Text

Convention Element Example

Bold italic Glossary term (if there is a glossary)

The algorithm inserts the new key.

Caps and lowercase

Buttons, check boxes, triggers, windows

Click the Executable button. Select the Can’t Delete Card check box. Assign a When-Validate-Item trigger to the ORD block. Open the Master Schedule window.

Courier new, case sensitive (default is lowercase)

Code output, directory names, filenames, passwords, pathnames, URLs, user input, usernames

Code output: debug.set (‘I”, 300); Directory: bin (DOS), $FMHOME (UNIX) Filename: Locate the init.ora file. Password: User tiger as your password. Pathname: Open c:\my_docs\projects URL: Go to http://www.oracle.com User input: Enter 300 Username: Log on as scott

Initial cap Graphics labels (unless the term is a proper noun)

Customer address (but Oracle Payables)

Italic Emphasized words and phrases, titles of books and courses, variables

Do not save changes to the database. For further information, see Oracle7 Server SQL Language Reference Manual. Enter [email protected], where user_id is the name of the user.

Quotation marks

Interface elements with long names that have only initial caps; lesson and chapter titles in cross-references

Select “Include a reusable module component” and click Finish. This subject is covered in Unit II, Lesson 3, “Working with Objects.”

Uppercase SQL column names, commands, functions, schemas, table names

Use the SELECT command to view information stored in the LAST_NAME column of the EMP table.

Page 8: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface - 6

Typographic Conventions in Code

Typographic Conventions in Navigation Paths

This course uses simplified navigation paths, such as the following example, to direct you through Oracle Applications.

(N) Invoice—>Entry—>Invoice Batches Summary (M) Query—>Find (B) Approve

This simplified path translates to the following:

1. (N) From the Navigator window, select Invoice—>Entry—>Invoice Batches Summary.

2. (M) From the menu, select Query—>Find.

3. (B) Click the Approve button.

N = Navigator, M = Menu, B = Button

Convention Element Example

Arrow Menu paths Select File—> Save.

Brackets Key names

Press [Enter].

Commas Key sequences Press and release keys one at a time: [Alternate], [F], [D]

Plus signs Key combinations Press and hold these keys simultaneously: [Ctrl]+[Alt]+[Del]

Convention Element Example

Caps and lowercase

Oracle Forms triggers

When-Validate-Item

Lowercase Column names, table names

SELECT last_name FROM s_emp;

Passwords DROP USER scott IDENTIFIED BY tiger;

PL/SQL objects OG_ACTIVATE_LAYER (OG_GET_LAYER (‘prod_pie_layer’))

Lowercase italic Syntax variables CREATE ROLE role

Uppercase SQL commands and functions

SELECT userid FROM emp;

Page 9: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Preface

1 Introduction to Oracle9i: New Features for Application DevelopersObjectives 1-2Enhancements in Oracle9i: Focus Areas 1-3Oracle9i SQL New Features 1-4Oracle9i PL/SQL New Features 1-5Oracle9i Java New Features 1-6Oracle9i XML New Features 1-7Oracle9i OCI New Features 1-8Oracle9i Objects New Features 1-9Oracle9i Availability New Features 1-10Oracle9i Performance New Features 1-11Oracle9i Security New Features 1-12Oracle9i Business Intelligence Enhancements 1-13Oracle9i Globalization New Features 1-14Other Oracle9i Database Functionality 1-15Course Prerequisites 1-16Course Objectives 1-17Agenda 1-18Summary 1-20

2 Data Integrity EnhancementsObjectives 2-2Overview 2-3Overview of Explicit Defaults 2-4Explicit Default 2-5Overview of Constraint Enhancements 2-7Less verhead on Unindexed Foreign Keys 2-8Primary Key Lookup During Foreign Key Creation 2-9Example of Creating Primary Key Constraint 2-10Example of Dropping Indexes 2-11Constraints on Views 2-12View Constraint Types 2-13Create Constrained Views 2-14Constrained View Maintenance 2-15Overview of FOR UPDATE WAIT Clause 2-16Example of Using FOR UPDATE WAIT Clause 2-17Index Scans and Function-Based Indexes 2-18Summary 2-19Practice 2 Overview 2-20

Contents

iii

Page 10: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

3 New DML Features for Data WarehousingObjectives 3-2Overview 3-3External Tables 3-4Example of Defining External Tables 3-5Querying External Tables 3-6Multitable INSERT Statement 3-7Multitable INSERT Syntax 3-8Types of Multitable INSERT Statements 3-9Example of Unconditional INSERT 3-10Example of Pivoting INSERT ALL 3-11Example of Pivoting INSERT All 3-12Example of Conditional INSERT ALL 3-13Example of Conditional INSERT FIRST 3-14Advantages of Multitable INSERTs 3-15MERGE Statements 3-16Example of Using the MERGE Statement in Data Warehousing 3-17Summary 3-18Practice 3 Overview 3-19

4 Business Intelligence EnhancementsObjectives 4-2Overview of Grouping Sets 4-3Grouping Sets 4-4GROUPING SETS 4-5Grouping Sets Example 4-6Grouping Sets Example: Results 4-7GROUPING SETS Versus CUBE and ROLLUP Statements 4-8Composite Columns 4-9Composite Columns 4-10Concatenated Groupings 4-11The WITH Clause: Overview 4-14The WITH Clause 4-15The WITH Clause: Example 4-16The WITH Clause: Implementation 4-17The WITH Clause: Usage Notes 4-18The WITH Clause: Benefits 4-19

iv

Page 11: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Analytical Function Enhancements 4-20Inverse Percentile Functions: Description 4-21Example of Inverse Percentile Functions 4-22What-if Rank and Distribution Functions 4-23RANK and DENSE_RANK: Example 4-24FIRST and LAST Aggregate Values 4-25The WIDTH_BUCKET Function 4-27The WIDTH_BUCKET: Example 4-28Benefits of Analytical Functions 4-29Summary 4-30Practice 4 Overview 4-31

5 ANSI/ISO SQL: 1999 Standard Support in Oracle9iObjectives 5-2Overview 5-3Applications for SQL: 1999 Features 5-4SQL: 1999 Joins 5-5Types of SQL: 1999 Compliant Joins 5-6Creating CROSS Joins 5-7Creating NATURAL Joins 5-8Retrieving Records with NATURAL Joins 5-9Creating Joins with the USING Clause 5-10Retrieving Records With the USING Clause 5-11Creating Joins With the ON Clause 5-12Example of Retrieving Records With the ON Clause 5-13Creating Complex Joins 5-14Join Predicates and the ON Clause 5-15Creating Multitable Joins 5-16INNER Versus OUTER Joins 5-17Example of LEFT OUTER Joins 5-18Example of RIGHT OUTER Joins 5-19Example of FULL OUTER Joins 5-20Example of Using Subqueries 5-21Example of Join Using NOT EXISTS 5-22CASE Expressions in SQL: 1999 5-23Simple CASE Expression 5-24Simple CASE Expression: Example 5-25Searched CASE Expression 5-26Searched CASE Expression: Example 5-27SQL NULLIF and COALESCE 5-28NULLIF and COALESCE 5-29SQL NULLIF Expression: Example 5-30SQL COALESCE Expression: Example 5-31COALESCE with Multiple Expressions: Example 5-32

v

Page 12: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Scalar Subqueries in SQL: 1999 5-33Using Scalar Subqueries 5-34Scalar Subquery in SELECT List Example 5-35Scalar Subqueries in the WHERE Clause 5-36Scalar Subqueries in the ORDER BY Clause 5-37Scalar Subqueries in CASE Expressions 5-38Scalar Subqueries in Functions 5-39Summary 5-40Practice 5 Overview 5-41

6 Datetime EnhancementsObjectives 6-2TIME_ZONE Session Parameter 6-3Datetime and Interval Data Types 6-4Datetime Data Types 6-5Datetime Fields 6-6TIMESTAMP Data Type 6-7Difference between DATE and TIMESTAMP 6-8TIMESTAMP WITH TIME ZONE Data Type 6-9TIMESTAMP WITH TIME ZONE: Example 6-10TIMESTAMP WITH LOCAL TIMEZONE 6-12TIMESTAMP WITH LOCAL TIME ZONE: Example 6-13INTERVAL Data Types 6-14INTERVAL Fields 6-15INTERVAL YEAR TO MONTH Data Type 6-16INTERVAL YEAR TO MONTH: Example 6-17INTERVAL YEAR TO MONTH Data Type: Example 6-18INTERVAL DAY TO SECOND Data Type 6-19INTERVAL DAY TO SECOND Data Type: Example 6-20Daylight Savings Time Boundaries 6-21Datetime Functions 6-22Datetime Conversion Functions 6-23Datetime EXTRACT Function 6-24CURRENT_DATE, CURRENT_TIMESTAMP and LOCALTIMESTAMP 6-25CURRENT_DATE: Example 6-26DBTIMEZONE: Example 6-28Using FROM_TZ: Example 6-29Using TO_DSINTERVAL: Example 6-30TO_TIMESTAMP: Example 6-31TZ_OFFSET: Example 6-32

vi

Page 13: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Using EXTRACT: Example 6-33Summary 6-34Practice 6 Overview 6-35

7 Migrating LONGs to LOBsObjectives 7-2Overview 7-3Oracle9i LONG to LOB Migration 7-4LONG to LOB Migration: Example 7-5Restrictions on LOB Migration 7-7SQL Support for LOB Migration 7-9Using SQL Functions on LOBs: Example 7-10PL/SQL Support for LOB Migration 7-11Implicit Assignment and Parameter Passing to LOBs 7-12Implicit Conversion of LOBs: Example 7-13Support for LOB Migration in OCI 7-14Other LOB Enhancements 7-15Summary 7-16Practice 7 Overview 7-17

8 Object and Collection Type EnhancementsObjectives 8-2Overview 8-3Type Inheritance 8-4Type Hierarchy 8-6Type Declarations 8-7FINAL and NOT FINAL Types 8-8NOT INSTANTIABLE Types 8-9Substitutability 8-10Attribute Inheritance 8-11Method Inheritance 8-12Method Override 8-13Dynamic Method Dispatch 8-14Rights Model 8-15Object and REF Assignment 8-16Widening: Example 8-17Narrowing by Using TREAT: Example 8-18Inheritance Support in Data Dictionary 8-19Object Type Evolution 8-20

vii

Page 14: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Type Dependencies 8-21Propagating Type Changes 8-22Propagating Nonstructural Changes 8-23Propagating Structural Changes 8-24Altering the Attributes of an Object Type 8-25Table Validation 8-26ALTER TYPE Statement Options 8-27Propagating Changes to Dependent Tables 8-28Multilevel Collection Types 8-29Applications of Multilevel Collections 8-30Creating Multilevel Collections 8-31Nested Tables in Multilevel Collections 8-32Varrays in Multilevel Collections 8-33Creating Tables with Multilevel Collections 8-34Collection Unnesting 8-35SYS.AnyType 8-36SYS.AnyData 8-37SYS.AnyDataSet 8-38Summary 8-39Practice 8 Overview 8-40

9 SQL Support in PL/SQLObjectives 9-2Overview 9-3PL/SQL CASE Statement 9-4Types of CASE 9-5Simple Versus Searched CASE 9-6Simple CASE Expression: Example 9-7Simple CASE Statement: Example 9-8Searched CASE Expression: Example 9-9Searched CASE Statement: Example 9-10NULLIF and COALESCE Expressions 9-11Using NULLIF in PL/SQL 9-12Using COALESCE in PL/SQL 9-13Overview of Cursor Subquery 9-14Cursor Subquery in Ref Cursor: Example 9-15Cursor Subquery in Explicit Cursor: Example 9-16Cursor Subquery: Nested Cursor Attributes 9-17

viii

Page 15: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Introducing the Common SQL Parser 9-18Visible Effects of Common SQL Parser 9-19Other PL/SQL Language Enhancements 9-20Transparent Performance Enhancements 9-21Summary 9-22Practice 9 Overview 9-23

10 Performance Enhancements in PL/SQLObjectives 10-2Overview of Native Compilation of PL/SQL 10-3New Parameters for Native Compilation 10-4Steps for Enabling Native Compilation 10-6Performance 10-8Benefits of Native Compilation of PL/SQL 10-9Restrictions to Native Compilation of PL/SQL 10-11Overview of Oracle9i Bulk Bind Enhancements 10-12FORALL Statement Enhancements 10-13Error Handling for Bulk Binds 10-14Example of Exception Handling 10-15Benefits of Bulk Bind Enhancement 10-17Overview of Bulk Dynamic SQL 10-18Bulk Bind with Dynamic SQL: Example 10-19Bulk Bind for Input Variables: Example 10-20Bulk Binding In Output Variables: Example 10-21Benefits of Bulk Dynamic SQL 10-22Overview of Table Functions 10-23PL/SQL Table Functions 10-24Example of Creating Table Functions 10-25Using Table Functions 10-26Advantages of PL/SQL Table Functions 10-27Transparent Performance Enhancements 10-28Summary 10-29Practice 10 Overview 10-30

ix

Page 16: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

11 Globalization SupportObjectives 11-2Overview of Unicode 11-3Unicode Encoding 11-4Overview of Oracle9i Unicode Support 11-5Unicode Storage 11-7Unicode Solutions: Database 11-8Unicode Solutions: Data Type 11-9Choosing a Unicode Solution: Unicode Database 11-10Choosing a Unicode Solution: Unicode Data Type 11-11NCHAR Interoperability 11-12Exception Handling for Data Loss 11-5Byte and Character Semantics for CHAR and VARCHAR2 11-16Character Semantics 11-17Character Semantics Support in Oracle9i 11-18Length Semantics 11-19Multilingual Linguistic Sorts 11-20Binary and Multilingual Sort 11-21SQL Collation Functions 11-23NLSSORT Function: Example 11-25Programming Interfaces 11-27Summary 11-28

12 Performance and Availability EnhancementsObjectives 12-2Overview of Performance Enhancements 12-3Enabling and Disabling Monitoring Index Usage 12-4V$OBJECT_USAGE View 12-5Skip Scanning of Indexes 12-7Cursor Sharing Enhancements 12-10CURSOR_SHARING Parameter 12-12Cached Execution Plans 12-13New View to Support Cached Execution Plans 12-14New PLAN_HASH_VALUE Column in V$SQL 12-15New First Rows Optimization 12-16New Gathering Statistic Estimates 12-17

x

Page 17: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

New GATHER AUTO Option 12-19Optimizer Cost Model Enhancements 12-20Gathering System Statistics 12-22Gathering System Statistics Example 12-23What Is a Bitmap Join Index? 12-25Advantages and Disadvantages 12-26Example With Three Tables 12-27Data Dictionary and Bitmap Join Indexes 12-28Bitmap Join Indexes Restrictions 12-29Overview of Outline Editing 12-30Steps for Outline Editing 12-32Outline Cloning 12-34Overview of Availability Enhancements 12-35Metadata API 12-36Metadata API in Oracle9i 12-37Metadata API in Oracle9i Browsing Example 12-38Metadata API: Advantages 12-39The Quiesce Database Feature 12-40Benefits of the Quiesce Database Feature 12-41Resumable Space Allocation 12-42Enabling and Disabling Resumable Space Allocation Mode 12-43Automatic Undo Management 12-44Summary 12-45Practice 12 Overview 12-46

13 Data Definition and Data Protection FeaturesObjectives 13-2Online Table Redefinition 13-3Online Table Redefinition Syntax 13-4Online Table Redefinition: Synchronization and Abort 13-5Online Table Redefinition: Example 13-7Online Index Rebuild 13-10Index-Organized Table High Availability Enhancements 13-13Mapping Tables 13-14Online Operations on IOTs Operations on Secondary Indexes 13-15Online Operations on IOTs Online Update of Logical ROWIDs 13-16Oracle8i Virtual Private Database (VPD) 13-17Oracle9i Virtual Private Database Features 13-18

xi

Page 18: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Secure Application Role 13-19Example Application Role 13-20Global Application Context 13-21Managing Global Application Context 13-22Global Application Context Function 13-23Global Context Example 13-24Fine-Grained Access Control (FGAC) Enhancements 13-25Policy Groups 13-26Partitioned Fine-Grained Access Control 13-27Fine-Grained Audit 13-28Fine-Grained Auditing Implementation 13-29Fine-Grained Auditing Example 13-30FGA Event Handler 13-31Encryption Enhancements 13-32Oracle Label Security 13-33Oracle Login Server 13-34Oracle Enterprise Login Assistant 13-35Enterprise User Security Enhancements 13-36Summary 13-37

14 Database Workspace ManagerObjectives 14-2Overview 14-3Database Workspaces 14-4How Does Workspace Manager Work? 14-5Example 14-6Workspace Manager Benefits and Applications 14-7Workspace Manager Benefits 14-8Workspace Manager Concepts 14-9Version-Enable a Table 14-11Guidelines for Tables Participating in a Workspace 14-12Disabling Workspace Participation for a Table 14-14Creating a Workspace 14-15Associating a User Session with a Workspace 14-16Granting Privileges 14-17Setting Locks 14-18Create Workspace Savepoint 14-20Implicit and Explicit Savepoints 14-21Compare Savepoints and Find Differences 14-22

xii

Page 19: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Deleting a Savepoint 14-24Freezing a Workspace 14-25Rollback a Workspace 14-26Refresh a Workspace 14-27Resolve Workspace Conflicts 14-28Check for Existence of Conflicts 14-29Resolve Conflicts 14-30Merge a Workspace 14-31Workspace Views 14-32Summary 14-33Practice 14 Overview 14-35

15 Support for Web-Based ApplicationsObjectives 15-2Introduction to XML 15-3A Simple XML Document 15-4XML Components 15-5What Is XSL? 15-7Sample Code 15-8Sample XSL Style Sheet: address.xsl 15-9HTML Output 15-10Overview of XDKs in Oracle9i 15-11What are the Components of Oracle9i XDK? 15-12XML Development Kit Components 15-13Oracle9i XML Schema Processors 15-14Oracle9i XDK for JavaBeans 15-15XML Parsers 15-16XSL Processors 15-17XML Class Generators 15-18XML SQL Utility 15-19XSQL Servlet 15-20XSQL File Example 15-22What Are the New Database XML Features? 15-23Overview of XMLType 15-24XMLType 15-25Using XMLType 15-27Example Using XMLType 15-28XMLType Storage Characteristics 15-29XMLType Functions 15-30

xiii

Page 20: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Example Using XMLType 15-31Indexing XMLTypes 15-32Benefits of XMLType 15-33Native XML Generation 15-34DBMS_XMLGEN 15-35DBMS_XMLGEN: Example 15-36Generated XML 15-37Generating Complex XML 15-38SYS_XMLGEN 15-41SYS_XMLAGG 15-42URI References 15-43The New URI Reference Data Types 15-45Using URITypes 15-46URIType Methods 15-48Benefits of URI Reference Types 15-49SYS_DBURIGEN() 15-50UTL_HTTP Enhancements in Oracle9i 15-52Cookies in UTL_HTTP 15-53Summary 15-55

16 API EnhancementsObjectives 16-2Overview 16-3New Features of the Extensibility Framework 16-4User-Defined Aggregate Functions 16-5Aggregation Logic 16-6Aggregation Implementation 16-8Steps for Creating an Aggregate Function 16-9Creating the Object Type Specification 16-10Creating the Object Type Body 16-11Create the Object Type Body 16-12Creating the Aggregate Function 16-13Using the Aggregate Function 16-14Pipelined Table Functions 16-15Implementing Table Functions 16-16ODCITable Interface 16-17Local Domain Indexes for Range-Partitioned Tables 16-18Function-Based Domain Indexes 16-19Domain Indexes on Embedded Object Types 16-20

xiv

Page 21: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

Domain Indexes on IOTs 16-21Oracle9i New Features in JDBC 16-22SQLJ Objects 16-24Creating SQLJ Object Types 16-25Creating the SQLJ Class 16-26Loading the SQLJ Class into the Database 16-28Creating SQLJ Object Types in the Database 16-29Other SQLJ Enhancements 16-30Overview of the Oracle C++ Call Interface 16-31Applications of OCCI 16-32Establishing a Connection Using OCCI 16-33Associative Relational Access 16-34Associative Access to Access Objects 16-37Navigational Access to Objects 16-40Oracle Call Interface (OCI) New Features 16-45Overview of Scrollable Cursors 16-46Connection Pooling in OCI 16-47New Object Type Translator (OTT) Features 16-48OTT: Example 16-49Summary 16-50

A Practices

B Practice Solutions

C Frequently Used Table Descriptions

D Review of Objects

E Specialized APIs

F Overview of Oracle8i Release 3 (8.1.7) New Features

G Introduction to iSQL*Plus

Index

xv

Page 22: Oracle9i: New Features for Developers - ФОРСedu.fors.ru/toc/db/30083GC11_TOC.pdf · • Introduction to Oracle SQl and PL/SQL ... Oracle9i: New Features for Developers is an instructor-led

xvi