Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)

Part Number A88879-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Modeling and Design, 21 of 21


User-Defined Aggregates and LOBs

User-defined aggregates (UDAGs) provide a mechanism for application/cartridge developers, and end-users to implement and deploy new aggregate functions over scalar datatypes (including LOBs) as well as object and opaque types.

The following are two examples of applications for user-defined aggregates (UDAGs):

User Defined Aggregate functions (UDAG) refer to aggregate functions with user specified aggregation semantics. You can create a new aggregate function and provide the aggregation logic via a set of routines. Once created, user defined aggregate functions can be used in SQL DML statements like built-in aggregates.

Complex data is typically stored in the database using object types, opaque types or LOBs. User-defined aggregates are useful in specifying aggregation over these domains of data.

UDAGs can also be used to create new aggregate functions over traditional scalar data types for financial or scientific applications. Since, it is not possible to provide native support for all forms of aggregates, this functionality provides you with a flexible way to add new aggregate functions.

An aggregate function takes a set of values as input and returns a single value. The sets of values for aggregation are typically identified using a GROUP BY clause. For example:

SELECT AVG(T.Sales)
  FROM AnnualSales T
  GROUP BY T.State


UDAGs allow you to register new aggregate functions by providing specific (new) implementations for the above primitive operations.

UDAGs: DDL Support

User-defined aggregate functions have the following DDL support:

UDAGs: DML and Query Support

User-defined aggregate functions have the following DML and query support:


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback