Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

OMNIDEX

Environment Catalog

Create an Environment Catalog

Syntax

 

Column Statement

Database Statement

Environment Statement

Index Statement

Message Statement

Rule Statement

Table Statement

Environment Catalog

Omnidex Environment Catalog

The Omnidex Environment Catalog is the starting point for constructing an Omnidex application. It is the primary source of information used by Omnidex to access a database and the Omnidex indexes.

An Environment Catalog is a collection of information, objects that include descriptions of databases, tables, columns and indexes, as well as Omnidex specific information like optimization options and configuration details. Omnidex uses this information to determine how to access the databases. It can also store supplemental information about the databases, that can enhance Omnidex's ability to optimize queries.

The Environment Catalog is both a superset and subset of information about the database. It is a superset of database information because a single Environment Catalog can contain information about multiple databases, including databases from different database management systems. However, it contains only a subset of the information tracked in the database management system about each of those databases, limited to the few details required by Omnidex.

Omnidex is aware only of the objects defined in the Environment Catalog. Any databases, tables, columns, etc... not defined in the Environment Catalog do not exist, as far as Omnidex is concerned, providing a fundamental level of security.

In the case of flat-file databases, the Environment Catalog plays a special role. Since plain flat-files rarely have meta-data stored in them, Omnidex acts as the database management system, using the Environment Catalog to describe the tables and columns and their relationships to each other, there by allowing standard SQL, ODBC and JDBC access to the data.

 

Create an Environment Catalog

An Omnidex Environment begins as an environment source file, a text file containing all the environment definitions, then is compiled into a binary file, the Environment Catalog used by Omnidex.

The best way to create an environment source file is to use the Omnidex utility OAHELPER. OAHELPER, can automatically generate an environment source file for most RDBMSs including Oracle, Informix, DB2 and SQL Server. Alternatively, you can create an environment source file by hand using any text editor.

If you have an existing Omnidex Environment Catalog, you can use the Omnidex utility OADECOMP, to decompile the binary file into an editable source file.

When the environment source file is complete, you must use the Omnidex utility OACOMP to compile the environment source file into a binary file, the Environment Catalog.

 

An environment file is divided into several statements beginning with the ENVIRONMENT statement. The general environment layout is as follows:

  • The ENVIRONMENT declaration contains overall configuration settings and is followed by one or more DATABASE statements.
  • Each DATABASE declaration describes the basic database characteristics and access instructions, followed by a series of TABLE statements.
  • Each TABLE declaration describes the table including its physical location, key constraints and a series of COLUMN statements.
  • Each COLUMN declaration describes the database column, including data type and length.
  • INDEX statements describing the native indexes in the database, follow the TABLE declarations.

This sequence is then repeated, in this order, for each database being described in this environment.

The following is a simple example Environment source file with a single database and a single table:

Environment start_env

Database start

Type flatfile

table sales_facts

column odx_seq_ID datatype INTEGER

column acct datatype CHAR(10)

column amount datatype INTEGER

 

Syntax

Statements in an environment catalog must follow a certain hierarchy. For example, COLUMN definition statements must follow the TABLE definition statement that defines the table to which the columns belong.

See the individual statement topics for specific details.

A single environment can contain multiple databases, which can be any combination of supported database types.

Logical names can be up to 32 characters long and must begin with a letter (upper or lower case). They can contain letters, numbers or any of the following characters:

_ ^ % @ ! #

Spaces and periods (.) cannot be used in names. Names containing other characters or reserved words, must be enclosed in double quotes (" ").

You can comment the Environment source file using conventional C-style comment notation:

/* This is a comment
which can span multiple lines. */

Syntax Convention

[ ] Optional syntax

{ } Required, choose one from the set.

option1 | option2 - Choose option1 or option2

option1 / option2 - option1 and option2 have the same meaning, both work.

 

Top