Skip to main content
Oracle Help Center

Sign Out

Sign In

  • Table of Contents
  • Search
  • Print
  • Download
  1. Database
  2. Oracle
  3. Oracle Database
  4. Release 19

Data Cartridge Developer's Guide

  • Table of Contents
  • Search
  • Print
  • Download

Table of Contents

Expand AllCollapse All
  • List of Figures
  • List of Tables
  • Title and Copyright Information
  • Preface
    • Audience
    • Documentation Accessibility
    • Conventions
  • Changes in This Release for Oracle Database Data Cartridge Developer's Guide
    • Changes in Oracle Database 19c, Version 19.1
  • Part I Introduction
    • 1 Introduction to Data Cartridges
      • 1.1 Overview of Data Cartridges
      • 1.2 Uses of Data Cartridges
        • 1.2.1 Data Cartridge Domains
      • 1.3 Extending the Server: Services and Interfaces
        • 1.3.1 Extensibility Services
          • 1.3.1.1 Extensible Type System
            • 1.3.1.1.1 User-Defined Types
            • 1.3.1.1.2 Collection Types
            • 1.3.1.1.3 Reference Types
            • 1.3.1.1.4 Large Objects
          • 1.3.1.2 Extensible Server Execution Environment
          • 1.3.1.3 Extensible Indexing
          • 1.3.1.4 Extensible Optimizer
        • 1.3.2 Extensibility Interfaces
    • 2 Roadmap to Building a Data Cartridge
      • 2.1 Data Cartridge Development Process
        • 2.1.1 Implement the Project
      • 2.2 Installing and Using Data Cartridges
      • 2.3 Requirements and Guidelines for Data Cartridge Components
        • 2.3.1 Cartridge Schemas
        • 2.3.2 Cartridge Globals
        • 2.3.3 Cartridge Error Message Names or Error Codes
        • 2.3.4 Cartridge Installation Directory
        • 2.3.5 Cartridge Files
        • 2.3.6 Shared Library Names for External Procedures
      • 2.4 Data Cartridge Deployment
        • 2.4.1 Data Cartridge Naming Conventions
          • 2.4.1.1 Need for Naming Conventions in Data Cartridges
          • 2.4.1.2 Unique Name Format
          • 2.4.1.3 Data Cartridge Naming Conventions
        • 2.4.2 Cartridge Registration
        • 2.4.3 Cartridge Directory Structure and Standards
        • 2.4.4 Cartridge Upgrades
        • 2.4.5 Import and Export of Cartridge Objects
        • 2.4.6 Cartridge Versioning
        • 2.4.7 Cartridge Internationalization
        • 2.4.8 Cartridge Administration
        • 2.4.9 Data Cartridge Development Approach
          • 2.4.9.1 Creating a Data Cartridge Plan
          • 2.4.9.2 Developing Data Cartridges
  • Part II Building Data Cartridges
    • 3 Defining Object Types for Data Cartridges
      • 3.1 Objects and Object Types for Data Cartridges
        • 3.1.1 Defining a DataStream Data Type
        • 3.1.2 Defining the Type Body
      • 3.2 Assigning an Object Identifier to an Object Type in Data Cartridges
        • 3.2.1 Specifying an ODI for an Object Type in Data Cartridges
        • 3.2.2 Assigning and Using OIDs in Data Cartridges
      • 3.3 Constructor Methods in Data Cartridges
        • 3.3.1 Creating a Type
        • 3.3.2 Instantiating a Type Object
      • 3.4 Object Comparison in Data Cartridges
        • 3.4.1 Implementing a Member Function
        • 3.4.2 Implementing Functions for Types Without a Simple Id Attribute
    • 4 Implementing Data Cartridges in PL/SQL
      • 4.1 Methods
        • 4.1.1 Implementing Methods
          • 4.1.1.1 Defining an Object Type
          • 4.1.1.2 Defining a “Greatest Common Divisor” Function
          • 4.1.1.3 Implementing Methods for an Object Type
        • 4.1.2 Invoking Methods
          • 4.1.2.1 General Syntax for Invoking Methods
          • 4.1.2.2 SQL Syntax for Invoking Methods
          • 4.1.2.3 PL/SQL Syntax for Invoking Methods
          • 4.1.2.4 Using the SELF Build-In Parameter
        • 4.1.3 Referencing Attributes in a Method
          • 4.1.3.1 Setting Variable Values
      • 4.2 Debugging PL/SQL Code
        • 4.2.1 Notes for C and C++ Developers of Data Cartridges
        • 4.2.2 Common Potential Errors
          • 4.2.2.1 Signature Mismatches
          • 4.2.2.2 RPC Time Out
          • 4.2.2.3 Package Corruption
    • 5 Implementing Data Cartridges in C, C++, and Java
      • 5.1 Shared Libraries
        • 5.1.1 Using Shared Libraries
          • 5.1.1.1 Creating an Alias Library
          • 5.1.1.2 Specifying the Location of the Library
          • 5.1.1.3 Creating an Alias Library through Directory Objects
      • 5.2 External Procedures
        • 5.2.1 Registering an External Procedure
          • 5.2.1.1 Defining the Body of a Package
      • 5.3 How PL/SQL Calls an External Procedure
      • 5.4 Configuring Files for External Procedures
        • 5.4.1 Updating the Listener Configuration File
        • 5.4.2 Directing Network to Refer to External Procedures
        • 5.4.3 Passing Parameters to an External Procedure
        • 5.4.4 Specifying Data Types
          • 5.4.4.1 Conversion to External Datatypes
          • 5.4.4.2 Conversion from External Datatypes
        • 5.4.5 Using the Parameters Clause
        • 5.4.6 Using the WITH CONTEXT Clause
      • 5.5 Using Callbacks
        • 5.5.1 Restrictions on Callbacks
      • 5.6 Common Potential Errors
        • 5.6.1 Calls to External Functions
        • 5.6.2 RPC Time Out
      • 5.7 Debugging External Procedures
        • 5.7.1 Using Package DEBUG_EXTPROC
        • 5.7.2 Debugging C Code in DLLs on Windows NT Systems
      • 5.8 Guidelines for Using External Procedures with Data Cartridges
      • 5.9 Java Methods
    • 6 Working with Unstructured Data Types
      • 6.1 Overview of Cartridges and Unstructured Data Types
      • 6.2 Using DDL for LOBs
        • 6.2.1 Creating a LOB Attribute of a Type
        • 6.2.2 Creating a LOB Object Table
        • 6.2.3 Creating LOB Columns
      • 6.3 LOB Locators
        • 6.3.1 Selecting a LOBs and Assigning it to a Local Variable
        • 6.3.2 Manipulating LOBs
      • 6.4 Emptying LOBs
        • 6.4.1 Using EMPTY_BLOB() in SQL
        • 6.4.2 Using EMPTY_CLOB() in PL/SQL
      • 6.5 Using the OCI to Manipulate LOBs
        • 6.5.1 OCI Functions for Manipulating LOBs
        • 6.5.2 Comparing OCI and PL/SQL Interfaces
        • 6.5.3 Selecting a Stored LOB into a Locator
      • 6.6 Using DBMS_LOB Package to Manipulate LOBs
        • 6.6.1 DBMS_LOB Package Routines
        • 6.6.2 Trimming a CLOB
      • 6.7 LOBs in External Procedures
        • 6.7.1 Defining an External Procedure (PL/SQL)
      • 6.8 LOBs and Triggers
      • 6.9 Using Open/Close as Bracketing Operations for Efficient Performance
        • 6.9.1 Errors and Restrictions Regarding Open/Close Operations
          • 6.9.1.1 Working with Open() and Close() Code Blocks
    • 7 Using Extensible Indexing
      • 7.1 Overview of Extensible Indexing
        • 7.1.1 Purpose of Indexes
        • 7.1.2 Purpose of Extensible Indexing
        • 7.1.3 When to Use Extensible Indexing
        • 7.1.4 Index Structures
          • 7.1.4.1 B-tree
          • 7.1.4.2 Hash
          • 7.1.4.3 k-d tree
          • 7.1.4.4 Point Quadtree
      • 7.2 Extensible Indexing Framework
      • 7.3 Using the Text Indextype
        • 7.3.1 Defining the Indextype
          • 7.3.1.1 Non-Index-Based Functional Implementations
          • 7.3.1.2 Index-Based Functional Implementations
        • 7.3.2 Using the Indextype
          • 7.3.2.1 Declaring a New Table
          • 7.3.2.2 Building a Text Domain Index for the Table
          • 7.3.2.3 Querying a Table Using a Contains() Operator
    • 8 Building Domain Indexes
      • 8.1 Overview of Indextypes and Domain Indexes
      • 8.2 ODCIIndex Interface
        • 8.2.1 Index Definition Methods
          • 8.2.1.1 ODCIIndexCreate()
          • 8.2.1.2 ODCIIndexAlter()
          • 8.2.1.3 ODCIIndexDrop()
        • 8.2.2 Index Maintenance Methods
          • 8.2.2.1 ODCIIndexInsert()
          • 8.2.2.2 ODCIIndexDelete()
          • 8.2.2.3 ODCIIndexUpdate()
        • 8.2.3 Index Scan Methods
          • 8.2.3.1 ODCIIndexStart()
          • 8.2.3.2 ODCIIndexFetch()
          • 8.2.3.3 ODCIIndexClose()
        • 8.2.4 Index Metadata Method
        • 8.2.5 Transaction Semantics During Index Method Execution
        • 8.2.6 Transaction Semantics for Index Definition Routines
        • 8.2.7 Consistency Semantics during Index Method Execution
        • 8.2.8 Privileges During Index Method Execution
      • 8.3 Creating, Dropping, and Commenting Indextypes
        • 8.3.1 Creating Indextypes
        • 8.3.2 Dropping Indextypes
        • 8.3.3 Commenting Indextypes
          • 8.3.3.1 INDEXTYPE Comments
      • 8.4 Domain Indexes
        • 8.4.1 Domain Index Operations
          • 8.4.1.1 Creating a Domain Index
          • 8.4.1.2 Changing a Domain Index
          • 8.4.1.3 Renaming a Domain Index
          • 8.4.1.4 Rebuilding a Domain Index
          • 8.4.1.5 Truncating a Domain Index
          • 8.4.1.6 Dropping a Domain Index
        • 8.4.2 Domain Indexes on Index-Organized Tables
          • 8.4.2.1 About Rowid Storage in a UROWID Column
          • 8.4.2.2 Determining the Size of a UROWID Column
          • 8.4.2.3 DML on Index Storage Tables
          • 8.4.2.4 Start, Fetch, and Close Operations on Index Storage Tables
          • 8.4.2.5 Indexes on Non-Unique Columns
        • 8.4.3 Domain Index Metadata
        • 8.4.4 Moving Domain Indexes Using Export/Import
        • 8.4.5 Moving Domain Indexes Using Transportable Tablespaces
        • 8.4.6 Domain Index Views
      • 8.5 Object Dependencies, Drop Semantics, and Validation
        • 8.5.1 Object Dependencies
        • 8.5.2 Object Drop Semantics
        • 8.5.3 Object Validation
      • 8.6 Indextype, Domain Index, and Operator Privileges
      • 8.7 Partitioned Domain Indexes
        • 8.7.1 Using Local Domain Index Methods
        • 8.7.2 About Partitioned Indexes
        • 8.7.3 Creating a Local Domain Index
        • 8.7.4 Dropping a Local Domain Index
        • 8.7.5 Altering a Local Domain Index
        • 8.7.6 Summary of Index States
        • 8.7.7 DML Operations with Local Domain Indexes
        • 8.7.8 Table Operations that Affect Indexes
        • 8.7.9 ODCIIndex Interfaces for Partitioning Domain Indexes
        • 8.7.10 Using SQL*Loader for Domain Indexes
      • 8.8 Using System Partitioning
        • 8.8.1 Advantages of System Partitioned Tables
        • 8.8.2 Implementing System Partitioning
          • 8.8.2.1 Creating a System-Partitioned Table
          • 8.8.2.2 Inserting Data into a System-Partitioned Table
          • 8.8.2.3 Deleting and Updating Data in a System-Partitioned Table
        • 8.8.3 Supporting Operations with System-Partitioned Tables
        • 8.8.4 Running Partition Maintenance Operations
        • 8.8.5 Altering Table Exchange Partitions with Indexes
      • 8.9 Using System-Managed Domain Indexes
      • 8.10 Designing System-Managed Domain Indexes
        • 8.10.1 Methods for Non-Partitioned Domain Indexes
        • 8.10.2 Methods for Local System-Managed Domain Indexes
      • 8.11 Creating Local Domain Indexes
      • 8.12 Maintaining Local Domain Indexes with INSERT, DELETE, and UPDATE
      • 8.13 Querying Local Domain Indexes
      • 8.14 System Managed Domain Index - Supported Schemes
      • 8.15 Restrictions of System-Managed Domain Indexing
      • 8.16 Migrating Non-Partitioned Indexes
      • 8.17 Migrating Local Partitioned Indexes
    • 9 Defining Operators
      • 9.1 User-Defined Operators
        • 9.1.1 Operator Bindings
        • 9.1.2 Operator Privileges
        • 9.1.3 Creating Operators
        • 9.1.4 Dropping Operators
        • 9.1.5 Altering Operators
          • 9.1.5.1 Necessary Privileges for ALTER OPERATOR
          • 9.1.5.2 Restrictions of ALTER OPERATOR
        • 9.1.6 Commenting Operators
        • 9.1.7 About Invoking Operators
          • 9.1.7.1 Creating Contains() Operator
          • 9.1.7.2 Using Contains() Operator in a Query
          • 9.1.7.3 Using Contains() Operator Incorrectly
      • 9.2 Operators and Indextypes
        • 9.2.1 Operators in the WHERE Clause
          • 9.2.1.1 Using Operator Predicates
          • 9.2.1.2 Resolving Query Results with the Contains() Operator
          • 9.2.1.3 Setting Up an Index Scan
          • 9.2.1.4 Execution Model for Index Scan Methods
          • 9.2.1.5 Filtering Multiple Table Queries with Contains() Operator
          • 9.2.1.6 Invoking Indextrype Routines for the Contains() Operator
        • 9.2.2 Using Operators Outside the WHERE Clause
          • 9.2.2.1 Creating Index-based Functional Implementations
          • 9.2.2.2 Implementing the Contains() Operator in Index-Based Functions
          • 9.2.2.3 Binding the Contains() Operator to the Functional Implementation
          • 9.2.2.4 Operator Resolution
          • 9.2.2.5 Operator Execution
        • 9.2.3 Operators that Return Ancillary Data
          • 9.2.3.1 Operator Bindings that Compute Ancillary Data
          • 9.2.3.2 Operator Bindings That Model Ancillary Data
          • 9.2.3.3 Operator Resolution
          • 9.2.3.4 Operator Execution
    • 10 Using Extensible Optimizer
      • 10.1 Overview of Query Optimization
        • 10.1.1 Statistics
          • 10.1.1.1 User-Defined Statistics
          • 10.1.1.2 User-Defined Statistics for Partitioned Objects
        • 10.1.2 Selectivity
          • 10.1.2.1 User-Defined Selectivity
        • 10.1.3 Cost
          • 10.1.3.1 User-Defined Cost
      • 10.2 Defining Statistics, Selectivity, and Cost Functions
        • 10.2.1 Defining a Statistics Type
        • 10.2.2 User-Defined Statistics Functions
        • 10.2.3 User-Defined Selectivity Functions
        • 10.2.4 User-Defined Cost Functions for Functions
        • 10.2.5 User-Defined Cost Functions for Domain Indexes
        • 10.2.6 Generating Statistics for System-Managed Domain Indexes
          • 10.2.6.1 Index-Partition Statistics Storage in an Index Table
          • 10.2.6.2 Index-Partition Statistics Storage in a Separate Table
          • 10.2.6.3 Index-Partition Statistics Storage in a Common Table
      • 10.3 Using User-Defined Statistics, Selectivity, and Cost
        • 10.3.1 User-Defined Statistics
          • 10.3.1.1 Column Statistics
          • 10.3.1.2 Implementing Domain Index Statistics
        • 10.3.2 User-Defined Selectivity
          • 10.3.2.1 User-Defined Operators
          • 10.3.2.2 Standalone Functions
          • 10.3.2.3 Package Functions
          • 10.3.2.4 Type Methods
          • 10.3.2.5 Default Selectivity
        • 10.3.3 User-Defined Cost
          • 10.3.3.1 User-Defined Operators
          • 10.3.3.2 Standalone Functions
          • 10.3.3.3 Package Functions
          • 10.3.3.4 Type Methods
          • 10.3.3.5 Default Cost
        • 10.3.4 Declaring a NULL Association for an Index or Column
        • 10.3.5 How DDL Operations Affect Statistics
      • 10.4 Predicate Ordering
      • 10.5 Dependency Model
      • 10.6 Restrictions and Suggestions
        • 10.6.1 Distributed Execution
        • 10.6.2 System-Managed Storage Tables and ASSOCIATE STATISTICS
        • 10.6.3 Aggregate Object-Level Statistics
        • 10.6.4 System-Managed Domain Indexing
        • 10.6.5 Collecting and Deleting User-Defined Statistics for System-Managed Indexes
          • 10.6.5.1 Collecting statistics for a system-managed domain index
          • 10.6.5.2 Deleting statistics for a system-managed domain index
          • 10.6.5.3 Collecting statistics for all partitions of a local system-managed domain index
          • 10.6.5.4 Deleting statistics for all partitions of a local system-managed domain index
          • 10.6.5.5 Collecting statistics for partition P2 of a local system-managed domain index
          • 10.6.5.6 Deleting statistics for partition P2 of a local system-managed domain index
          • 10.6.5.7 Collecting statistics for all subpartitions of a composite partition of a local system-managed domain index
          • 10.6.5.8 Deleting statistics for all subpartitions of a composite partition of a local system-managed domain index
          • 10.6.5.9 Collecting statistics for a subpartition of a local system-managed domain index
          • 10.6.5.10 Deleting statistics for a subpartition of a local system-managed domain index
        • 10.6.6 Performance
    • 11 Using Cartridge Services
      • 11.1 Introduction to Cartridge Services
      • 11.2 Cartridge Handle
        • 11.2.1 Client Side Usage
        • 11.2.2 Cartridge Side Usage
        • 11.2.3 Making Service Calls
        • 11.2.4 Handling Errors
      • 11.3 Memory Services
      • 11.4 Maintaining Context
        • 11.4.1 Durations
      • 11.5 Globalization Support
        • 11.5.1 Globalization Support Language Information Retrieval
        • 11.5.2 String Manipulation
      • 11.6 Parameter Manager Interface
        • 11.6.1 Input Processing and Support for Special Characters
        • 11.6.2 Parameter Manager Behavior Flag
        • 11.6.3 Key Registration
        • 11.6.4 Parameter Storage and Retrieval
        • 11.6.5 Parameter Manager Context
      • 11.7 File I/O
      • 11.8 String Formatting
    • 12 Using User-Defined Aggregate Functions
      • 12.1 Overview of User-Defined Aggregate Functions
        • 12.1.1 Using User-Defined Aggregate Functions
      • 12.2 Creating a User-Defined Aggregate
      • 12.3 Using a User-Defined Aggregate
        • 12.3.1 Using the SELECT Statement with User-Defined Aggregate Functions
        • 12.3.2 Using the HAVING Clause with User-Defined Aggregate Functions
        • 12.3.3 Using Query Options with User-Defined Aggregate Functions
      • 12.4 Evaluating User-Defined Aggregates in Parallel
      • 12.5 Handling Large Aggregation Contexts
        • 12.5.1 External Context and Parallel Aggregation
          • 12.5.1.1 Using External Memory to Store Aggregate Context
        • 12.5.2 User-Defined Aggregates and Analytic Functions
          • 12.5.2.1 Using User-Defined Aggregates and Analytic Functions
        • 12.5.3 Reuse of Aggregation Context for Analytic Functions
        • 12.5.4 External Context and User-Defined Analytic Functions
      • 12.6 Using Materialized Views with User-Defined Aggregates
      • 12.7 Creating and Using a User-Defined Aggregate Function
    • 13 Using Pipelined and Parallel Table Functions
      • 13.1 Overview of Table Functions
      • 13.2 Table Function Concepts
        • 13.2.1 Table Functions
        • 13.2.2 Pipelined Table Functions
        • 13.2.3 Pipelined Table Functions with REF CURSOR Arguments
        • 13.2.4 Parallel Execution of Table Functions
      • 13.3 Pipelined Table Functions
        • 13.3.1 Implementation Choices for Pipelined Table Functions
        • 13.3.2 Declaring Pipelined Table Functions
        • 13.3.3 Implementing the Native PL/SQL Approach
        • 13.3.4 Pipelining Between PL/SQL Table Functions
        • 13.3.5 Combining PIPE ROW with AUTONOMOUS_TRANSACTION
        • 13.3.6 Implementing the Interface Approach
          • 13.3.6.1 Scan Context
          • 13.3.6.2 Start Routine
          • 13.3.6.3 Fetch Routine
          • 13.3.6.4 Close Routine
          • 13.3.6.5 Describing Returned Data Sructures; Describe Method
          • 13.3.6.6 Preparing a Query for Execution; Prepare Method
        • 13.3.7 Querying Table Functions
          • 13.3.7.1 Implementing Multiple Calls to Table Functions
          • 13.3.7.2 Using PL/SQL REF CURSOR Variables
        • 13.3.8 Performing DML Operations Inside Table Functions
        • 13.3.9 Performing DML Operations on Table Functions
        • 13.3.10 Handling Exceptions in Table Functions
      • 13.4 Parallel Table Functions
        • 13.4.1 Inputting Data with Cursor Variables
          • 13.4.1.1 Using Multiple REF CURSOR Input Variables
          • 13.4.1.2 Explicitly Opening a REF CURSOR for a Query
          • 13.4.1.3 PL/SQL REF CURSOR Arguments to Java and C/C++ Functions
        • 13.4.2 Input Data Partitioning
        • 13.4.3 Parallel Execution of Leaf-Level Table Functions
      • 13.5 Input Data Streaming for Table Functions
        • 13.5.1 Setting up the Input Stream
        • 13.5.2 Parallel Execution: Partitioning and Clustering
      • 13.6 Creating Domain Indexes in Parallel
        • 13.6.1 Loading Domain Indexes
      • 13.7 Transient and Generic Types
    • 14 Designing Data Cartridges
      • 14.1 Choosing the Programming Language
      • 14.2 Invoker's Rights
      • 14.3 Callouts and LOBs
      • 14.4 Saving and Passing State
      • 14.5 Designing Indexes
        • 14.5.1 Domain Index Performance
        • 14.5.2 Domain Index Component Names
        • 14.5.3 When to Use Index-Organized Tables
        • 14.5.4 Storing Index Structures in LOBs
        • 14.5.5 External Index Structures
        • 14.5.6 Multi-Row Fetch
      • 14.6 Designing Operators
      • 14.7 Designing for the Extensible Optimizer
        • 14.7.1 Weighing Cost and Selectivity
        • 14.7.2 Cost for functions
          • 14.7.2.1 Selectivity for Functions
          • 14.7.2.2 Statistics for Tables
          • 14.7.2.3 Statistics for Indexes
      • 14.8 Designing for Maintenance
      • 14.9 Enabling Cartridge Installation
      • 14.10 Designing for Portability
  • Part III Scenarios and Examples
    • 15 Power Demand Cartridge Example
      • 15.1 Feature Requirements
      • 15.2 Modeling the Application
        • 15.2.1 Sample Queries
      • 15.3 Queries and Extensible Indexing
        • 15.3.1 Queries Not Benefiting from Extensible Indexing
        • 15.3.2 Queries Benefiting from Extensible Indexing
      • 15.4 Creating the Domain Index
        • 15.4.1 Creating the Schema to Own the Index
        • 15.4.2 Creating the Object Types
        • 15.4.3 Defining the Object Type Methods
        • 15.4.4 Understanding Functions and Operators
          • 15.4.4.1 Creating Functions and Operators
        • 15.4.5 Creating the Indextype Implementation Methods
        • 15.4.6 Defining theType
          • 15.4.6.1 ODCIGetInterfaces()
          • 15.4.6.2 ODCIIndexCreate()
          • 15.4.6.3 ODCIIndexDrop()
          • 15.4.6.4 ODCIIndexStart(); Specific Queries
          • 15.4.6.5 ODCIIndexStart(); Any Queries
          • 15.4.6.6 ODCIIndexFetch()
          • 15.4.6.7 ODCIIndexClose()
          • 15.4.6.8 ODCIIndexInsert()
          • 15.4.6.9 ODCIIndexDelete()
          • 15.4.6.10 ODCIIndexUpdate()
          • 15.4.6.11 ODCIIndexGetMetadata()
        • 15.4.7 Creating the Indextype
      • 15.5 Defining Types and Methods for Extensible Optimizing
        • 15.5.1 Creating the Statistics Table, PowerCartUserStats
        • 15.5.2 Creating the Extensible Optimizer Methods
          • 15.5.2.1 Creating the Type Definition
          • 15.5.2.2 ODCIGetInterfaces()
          • 15.5.2.3 ODCIStatsCollect() Method for PowerDemand_Typ Columns
          • 15.5.2.4 ODCIStatsDelete() Method for PowerDemand_Typ Columns
          • 15.5.2.5 ODCIStatsCollect() Method for power_idxtype Domain Indexes
          • 15.5.2.6 ODCIStatsDelete() Method for power_idxtype Domain Indexes
          • 15.5.2.7 ODCIStatsSelectivity() Method for Specific Queries
          • 15.5.2.8 ODCIStatsIndexCost() Method for Specific Queries
          • 15.5.2.9 ODCIStatsIndexCost() Method for Any Queries
          • 15.5.2.10 ODCIStatsFunctionCost() Method
        • 15.5.3 Associating the Extensible Optimizer Methods with Database Objects
        • 15.5.4 Analyzing the Database Objects
      • 15.6 Testing the Domain Index
        • 15.6.1 Creating and Populating the Power Demand Table
        • 15.6.2 Querying Without the Index
        • 15.6.3 Creating the Index
        • 15.6.4 Querying with the Index
    • 16 PSBTREE: Extensible Indexing Example
      • 16.1 About the PSBTREE Example
      • 16.2 Design of the Indextype
      • 16.3 Implementing Operators
        • 16.3.1 Functional Implementations
          • 16.3.1.1 Implementing the EQUALS Operator
          • 16.3.1.2 Implementing the LESS THAN Operator
          • 16.3.1.3 Implementing the GREATER THAN Operator
        • 16.3.2 Operators
      • 16.4 Implementing the ODCIIndex Interfaces
        • 16.4.1 Defining an Implementation Type for PSBTREE
        • 16.4.2 Creating the Implementation Type Body
        • 16.4.3 Defining PL/SQL Routines in the Implementation Body
          • 16.4.3.1 Implementing ODCIGetInterfaces() for PBSTREE in PL/SQL
          • 16.4.3.2 Implementing ODCIIndexCreate() for PBSTREE in PL/SQL
          • 16.4.3.3 Implementing ODCIIndexDrop() for PBSTREE in PL/SQL
          • 16.4.3.4 Implementing ODCIIndexAlter() for PSBTREE in PL/SQL
          • 16.4.3.5 Implementing ODCIIndexUpdPartMetadata() for PSBTREE in PL/SQL
          • 16.4.3.6 Implementing ODCIIndexExchangePartition() for PSBTREE in PL/SQL
        • 16.4.4 Registering the C Implementation of the ODCIIndexXXX() Methods
          • 16.4.4.1 Registering the Implementation of ODCIIndexInsert()
          • 16.4.4.2 Registering the Implementation of ODCIIndexDelete()
          • 16.4.4.3 Registering the Implementation of ODCIIndexUpdate()
          • 16.4.4.4 Registering the Implementation of ODCIIndexStart()
          • 16.4.4.5 Registering the Implementation of ODCIIndexFetch()
          • 16.4.4.6 Registering the Implementation of ODCIIndexClose()
        • 16.4.5 Defining Additional Structures in C Implementation
        • 16.4.6 Defining C Methods in the Implementation Body
          • 16.4.6.1 Implementing a Common Error Processing Routine in C
          • 16.4.6.2 Implementing ODCIIndexInsert() for PSBTREE in C
          • 16.4.6.3 Implementing ODCIIndexDelete() for PSBTREE in C
          • 16.4.6.4 Implementing ODCIIndexUpdate() for PSBTree in C
          • 16.4.6.5 Implementing ODCIIndexStart() for PSBTREE in C
          • 16.4.6.6 Implementing ODCIIndexFetch() for PSBTREE in C
          • 16.4.6.7 Implementing ODCIIndexClose() for PSBTREE in C
        • 16.4.7 Implementing the Indextype for PSBTREE
      • 16.5 Using PSBTREE
        • 16.5.1 Creating and Populating a Partitioned Table for PSBTREE
        • 16.5.2 Creating a PSBTREE Index on a Column
        • 16.5.3 Using PSBTREE Operators in a Query
    • 17 Pipelined Table Functions: Interface Approach Example
      • 17.1 Pipelined Table Functions Example: C Implementation
        • 17.1.1 Making SQL Declarations for C Implementation
        • 17.1.2 Implementation ODCITable Methods in C
      • 17.2 Pipelined Table Functions Example: Java Implementation
        • 17.2.1 Making SQL Declarations for Java Implementation
        • 17.2.2 Implementing the ODCITable Methods in Java
  • Part IV Reference
    • 18 Cartridge Services Using C, C++ and Java
      • 18.1 OCI Access Functions for External Procedures
        • 18.1.1 OCIExtProcAllocCallMemory
        • 18.1.2 OCIExtProcRaiseExcp
        • 18.1.3 OCIExtProcRaiseExcpWithMsg
        • 18.1.4 OCIExtProcGetEnv
      • 18.2 Installing Java Cartridge Services Files
      • 18.3 Cartridge Services-Maintaining Context
        • 18.3.1 ContextManager
        • 18.3.2 CountException()
        • 18.3.3 CountException(String)
        • 18.3.4 InvalidKeyException()
        • 18.3.5 InvalidKeyException(String)
    • 19 Extensibility Constants, Types, and Mappings
      • 19.1 System Defined Constants
        • 19.1.1 ODCIArgDesc.ArgType System Defined Constants
        • 19.1.2 ODCIEnv.CallProperty System Defined Constants
        • 19.1.3 ODCIIndexAlter System Defined Constants
        • 19.1.4 ODCIIndexInfo.Flags System Defined Constants
        • 19.1.5 ODCIIPartInfo.PartOp System Defined Constants
        • 19.1.6 ODCIIPredInfo.Flags System Defined Constants
        • 19.1.7 ODCIFuncInfo.Flags System Defined Constants
        • 19.1.8 ODCIQueryInfo.Flags System Defined Constants
        • 19.1.9 ODCIStatsOptions.Flags System Defined Constants
        • 19.1.10 ODCIStatsOptions.Options System Defined Constants
        • 19.1.11 Return Status System Defined Constants
        • 19.1.12 ScnFlg System Defined Constants
      • 19.2 System-Defined Types
        • 19.2.1 ODCIArgDesc
        • 19.2.2 ODCIArgDescList
        • 19.2.3 ODCIRidList
        • 19.2.4 ODCIColInfo
        • 19.2.5 ODCIColInfoList
        • 19.2.6 ODCICost
        • 19.2.7 ODCIEnv
        • 19.2.8 ODCIFuncInfo
        • 19.2.9 ODCIIndexInfo
        • 19.2.10 ODCIIndexCtx
        • 19.2.11 ODCIObject
        • 19.2.12 ODCIObjectList
        • 19.2.13 ODCIPartInfo
        • 19.2.14 ODCIPartInfoList
        • 19.2.15 ODCIPredInfo
        • 19.2.16 ODCIQueryInfo
        • 19.2.17 ODCIStatsOptions
        • 19.2.18 ODCITabFuncStats
        • 19.2.19 ODCITabStats
        • 19.2.20 ODCIBFileList
        • 19.2.21 ODCITabFuncInfo
        • 19.2.22 ODCIDateList
        • 19.2.23 ODCINumberList
        • 19.2.24 ODCIRawList
        • 19.2.25 ODCIVarchar2List
        • 19.2.26 ODCIFuncCallInfo
      • 19.3 Mappings of Constants and Types
        • 19.3.1 Mappings in PL/SQL
        • 19.3.2 Mappings in C
    • 20 Extensible Indexing Interface
      • 20.1 Extensible Indexing - System-Defined Interface Routines
        • 20.1.1 ODCIGetInterfaces()
        • 20.1.2 ODCIIndexAlter()
        • 20.1.3 ODCIIndexClose()
        • 20.1.4 ODCIIndexCreate()
        • 20.1.5 ODCIIndexDelete()
        • 20.1.6 ODCIIndexDrop()
        • 20.1.7 ODCIIndexExchangePartition()
        • 20.1.8 ODCIIndexFetch()
        • 20.1.9 ODCIIndexGetMetadata()
        • 20.1.10 ODCIIndexInsert()
        • 20.1.11 ODCIIndexStart()
        • 20.1.12 ODCIIndexUpdate()
        • 20.1.13 ODCIIndexUpdPartMetadata()
        • 20.1.14 ODCIIndexUtilCleanup()
        • 20.1.15 ODCIIndexUtilGetTableNames()
    • 21 Extensible Optimizer Interface
      • 21.1 Extensible Optimizer Interface
        • 21.1.1 Using Statistics Functions in an Extensible Optimizer Interface
        • 21.1.2 EXPLAIN PLAN
        • 21.1.3 INDEX Hint
        • 21.1.4 ORDERED_PREDICATES Hint
      • 21.2 User-Defined ODCIStats Functions
        • 21.2.1 ODCIGetInterfaces()
        • 21.2.2 ODCIStatsCollect()
        • 21.2.3 ODCIStatsDelete()
        • 21.2.4 ODCIStatsFunctionCost()
        • 21.2.5 ODCIStatsExchangePartition()
        • 21.2.6 ODCIStatsIndexCost()
        • 21.2.7 ODCIStatsSelectivity()
        • 21.2.8 ODCIStatsTableFunction()
        • 21.2.9 ODCIStatsUpdPartStatistics()
    • 22 User-Defined Aggregate Functions Interface
      • 22.1 User-Defined Aggregate Functions
        • 22.1.1 ODCIAggregateDelete()
        • 22.1.2 ODCIAggregateInitialize()
        • 22.1.3 ODCIAggregateIterate()
        • 22.1.4 ODCIAggregateMerge()
        • 22.1.5 ODCIAggregateTerminate()
        • 22.1.6 ODCIAggregateWrapContext()
    • 23 Pipelined and Parallel Table Functions
      • 23.1 Routines for Pipelined and Parallel Table Functions in C
        • 23.1.1 ODCITableClose()
        • 23.1.2 ODCITableDescribe()
        • 23.1.3 ODCITableFetch()
        • 23.1.4 ODCITablePrepare()
        • 23.1.5 ODCITableStart()
  • A User-Managed Local Domain Indexes
    • A.1 Comparing User-Managed and System-Managed Domain Indexes
    • A.2 Truncating Domain Indexes
    • A.3 Creating Indextypes
    • A.4 Using Domain Indexes for the Indextype
    • A.5 Partitioning Domain Indexes
    • A.6 APIs for User-Managed Domain Indexes
      • A.6.1 ODCIIndexTruncate()
      • A.6.2 ODCIIndexMergePartition()
      • A.6.3 ODCIIndexSplitPartition()
  • Index

Search

Print

Download

PDF for offline and print

  • Previous
  • Next
  1. Data Cartridge Developer's Guide
  2. Reference

Part IV Reference

This part contains reference information on cartridge-related APIs.

  • Cartridge Services Using C_ C++ and Java

  • Extensibility Constants_ Types_ and Mappings

  • Extensible Indexing Interface

  • Extensible Optimizer Interface

  • User-Defined Aggregate Functions Interface

  • Pipelined and Parallel Table Functions

  • Previous
  • Next
Back to main content
  • About Oracle
  • Contact Us
  • Legal Notices
  • Terms of Use
  • Your Privacy Rights
Copyright © 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  • Previous
  • Next
Video