Oracle10g Expression Filter
The Oracle Expression Filter allows application developers to
manage and evaluate conditional expressions that describe users’
interests in data. The feature consists of: an Expression datatype,
a SQL EVALUATE operator, and an index (Enterprise Edition only).
The Oracle Expression Filter allows you to store conditional
expressions in a column, which you can then use in the WHERE
clause of a database query.
You can use the EVALUATE operator to identify the conditional
expressions that return true for a given data item. For example,
the following query can be issued to return all the boaters who
are interested in a given boat (Model=’Sunray’, Length=32,
Year=2002):
SELECT
Name,
Email
FROM
Boaters
WHERE
EVALUATE (Boat4Sale,
’Model=>''SunRay'', Length=>32, Year=>2002’) = 1;
To speed up such queries, you can create an optional Expression
Filter index on the INTEREST column, this is only available in the
Enterprise edition of Oracle.
The Oracle Expression Filter is an internal set of functions
and procedures that enables conditional expressions to be stored,
managed, and evaluated efficiently in Oracle Database 10g.
The conditional expressions, referred to as Expressions, are a
useful way of describing the interest of a user regarding some
expected data.
The Oracle Expression Filter provides a SQL schema and PL/SQL
and Java packages that facilitate the storage, retrieval, update,
and query of collections of Expressions in Oracle Database 10g.
The Expression Filter consists of the following components:
- The EXFSYS schema that determines the storage, syntax, and
semantics of the Expression datatypes.
- The Expression Filter indexing mechanism.
- A set of operators and functions that evaluate the
Expressions stored in user tables for a given data item.
- The Administrative utilities to validate and give advice
about correct index structure
The Expression Filter feature can be installed on an Oracle 10g
Standard or Enterprise Edition database. It is provided as a set
of PL/SQL packages, a Java package, a set of dictionary tables,
and catalog views. All these objects are created in a dedicated
schema named EXFSYS. This schema is not part of the typical
installation of the database and will not exist before the
Expression Filter is installed. For these initial Oracle Database
10g releases, you'll need to manually install the feature, in a
future release, you will not need to do so.
The script to install the Expression Filter feature is
available as catexf.sql, under the $ORACLE_HOME/rdbms/admin/
directory. This script should be executed from a SQL*Plus session
while connected as SYSDBA. The catexf.sql script performs the
following actions:
- Creates the exfsys schema owner using exfsys.exe
- Loads information about the exfsys schema into the
dbms_registry package
- Creates the Java Expresssion library, using initexf.sql
- Creates the exfsys objects, using exftyp.sql
- Creates the Expression Filter Dictionary, using exftab.sql
- Creates the public PL/SQL packages with exfpbs.sql
- Creates the Expression filter catalog views, using
exfview.sql
- Creates the sys owned private package, using exfsppvs.plb
- Creates the Expression filter APIs, using exfeapvs.plb
- Creates the Expression filter indextype and operators, using
exfimpvs.plb
- Creates the Xpath Expression filter support, using
exfxppvs.plb
- Creates the indextype definition for the EXPFilter indextype
- Associates the statistical methods with the appropriate
functions
|