DISC

Contents | What's New | Quick Links

 

Omnidex Environments

Introduction

Software Installation

Concepts and Design

Designing Applications

Omnidex Environments

SQL Reference

Omnidex API's

Utilities

Interfaces

Performance Guide

Troubleshooting Guide

Appendix

 

 

Relational Databases

 

Defining Tables | Defining Columns

Assembly Rules | Omnidex ROWIDs | Defining User Access

 

For native DBMSs, the DATABASE statement identifies the database by name. Supply the name of the database as it is defined in the DBMS. For example, if you are defining a database named "ORDERS", you should enter ORDERS for database.

For Oracle, use the ORACLE_SID or ORA_SID(OpenVMS).

When OmniAccess uses the DATABASE name to locate files, it assumes that the database resides in the login directory for the process. If the database resides on a different path (device, directory, or MPE group) than the login directory, provide path information using the PHYSICAL attribute.

Flat Files

C-ISAM

POSIX Flat Files

Relational Databases

Oracle

Sybase

Informix

Database Specifics

Omnidex Environments

Syntax

Similarly, if you assign a logical name to a database, instead of its defined name, declare a PHYSICAL attribute to direct OmniAccess to the database root file.

 

Defining Tables

In a DBMS where tables are defined, supply the defined name of a table from the defined database. No other declarations are required when TABLE is defined as part of a supported DBMS

 

 

Defining COLUMNs

In a DBMS where columns are defined, you should supply the name of a column from the defined database.

 

Assembly Rules

You can create virtual columns by specifying SQL assembly rules in a column statement.

The OMNIDEX environment catalog supports SQL SELECT and SQL INSERT assembly rules as supported by the native data management system. You can use these to represent database expressions, functions, or composite search items. The SQL SELECT rule determines what data is returned when that column is displayed. The SQL INSERT rule determines what data is inserted for that column based on data inserted in other fields for that row.

The following rules apply:

  • Both SELECT and INSERT rules may include native database functions, or any other legal syntax supported by the database.
  • Special tokens are supported in these rules which relate to the database, table and column names. The following tokens are supported:

%d represents the database wherever it appears in the rule string.

%t represents the table wherever it appears in the rule string.

%c represents the column wherever it appears in the rule string.

  • Tokens can appear multiple times in a single assembly rule. For example:

'%t,%c+(0.05*%t,%c)'

top

 

Omnidex ROWIDs

If a four-byte integer column in a table contains sequentially ascending unique values, and there is an index installed on it, you can use that column as an Omnidex row ID. To declare a column as an Omnidex row ID, add a USAGE clause after the DATATYPE. The USAGE clause should contain any of the following predicates:

ROWID designates the column as an Omnidex row ID where unique values are assigned programmatically.

AUTO ROWID designates the column as an Omnidex row ID where unique values are assigned by the native data management platform.

The LENGTH of the column must be declared as LENGTH 4.

The example below shows the CUST_NO column being designated as an Omnidex row ID whose value is programmatically assigned by the RDBMS whenever a new record is added to the table:

COLUMN CUST_NO DATATYPE INTEGER USAGE ROWID LENGTH 4

If the Omnidex row ID value is automatically assigned by the native RDBMS, the column definition should look like this:

COLUMN CUST_NO DATATYPE INTEGER USAGE AUTO ROWID LENGTH 4

top

 

Defining User Access

If the DBMS requires a user name and password to access tables, you must also declare a USERCLASS. By associating a user class named "DEFAULT" with a USER name and PASSWORD, USERCLASS declares the type of access that all users of the environment catalog have to its database. The USER name and PASSWORD declared in the USERCLASS statement are used to open the declared DATABASE after successfully connecting to the OMNIDEX environment catalog.

You can override the access defined in the environment catalog by calling oaconnect with the DBUSER option.

top

Dynamic Information Systems Corporation - Omnidex Version 3.8 Build 6 J15.03-Copyright © 2003

DISC | Documentation Home