Load Definitions for Oracle

The Load Definitions functionality is supported for Oracle databases.

Functionality

The Load Definitions utility loads tables, views, columns, and indexes

It does not load relationships.

Keys and Indexes

The Load Definitions utility loads primary keys in different ways depending on the defined constraints. The primary keys are loaded as follows:

  • If Oracle primary key constraints are defined, they are always loaded as primary keys, regardless of whether the Oracle primary key constraint is in an enabled or disabled state.
  • If no primary key constraint is defined, but one or more unique indexes or enabled unique key constraints are defined, one of them is arbitrarily chosen to be the primary key.
  • If there are no primary key or enabled unique key constraints, and no unique indexes defined in Oracle, no primary key is loaded.

Oracle unique indexes and enabled unique key constraints are loaded as candidate keys by the Load Definitions utility. The only exception to this is when a unique index or an enabled unique key constraint has already been chosen to be the primary key. Disabled unique key constraints are not loaded.

Oracle non-unique indexes are loaded as indexes by the Load Definitions utility.

Configuration

Before loading definitions from Oracle:

  • Specify the ORA connector in the [DRIVERS] section of the IDE assignment file.
  • Specify the $ORA path in the [PATHS] section of the IDE assignment file.

For more detailed instructions, see Import Data Definitions From a DBMS .

Data Type Mapping

The Load Definitions utility maps Oracle data types to Uniface data types and packing codes. The following table lists these mappings.

Fields with data type S (String) have the default syntax FUL. For more information, see $FULL_SYNTAX.

Oracle to Uniface Storage Mappings

Oracle Data Type

Supported by Load Definitions

Uniface Data Type

Uniface Packing Code

Remarks
CHAR(n BYTE) Yes S Cn Fixed length data type. n is the byte length, which must be <=255.
CHAR(n CHAR) Yes S Wn Fixed length data type. n is the string length,, which must be <=255.
VARCHAR2(n BYTE) Yes

S

VCn Variable length data type. n is the byte length, which must be <=4000. Length >= 2001 requires Oracle connector option varchar2_4k.
VARCHAR2(n CHAR) Yes S VWn Variable length data type. n is the string length, which must be <=4000. Length >= 2001 requires Oracle connector option varchar2_4k.
LONG Yes S SC* Requires Oracle connector option u4_compatibility.
CLOB   S SC*  
NCLOB Yes S SW*  
NCHAR(n)   S W(n) n is the byte length, which must be <=255.
NVARCHAR2(n)   S VWn n is the string length, which must be <=4000. Length >= 2001 requires Oracle connector option varchar2_4k.
NUMBER (p, s) Yes N Cp+1.s p is precision (total number of digits); for Uniface p must be 30 max; field is skipped with a warning if p is larger.

s is scale (number of decimal places); for Uniface s must be smaller than p; field is skipped with a warning if they are equal.

s=0 generates N(p+1), rather than N(p+1).0

A ValRep is generated to enforce the exact DBMS max/min values during data entry and store validation; the ValRep range depends on p and s. For example, NUMBER(6,2) = N, C7.2, valrep(-9999.99:9999.99)

NUMBER (p) Yes N N(p)

Precision defined, scaling 0.

NUMBER (p) Yes F F8 No precision and no scaling defined.
FLOAT(p) with p 1 to 23 Yes F F4

 

FLOAT(p) with n 23 to 50 Yes F F8  

DATE

Yes

E

E

Formatted as DIS(DD-MMM-YY HH:MM:SS). Generated with a warning about the data range: Oracle allows B.C. dates and Uniface does not.
TIMESTAMP Yes E E13 Formatted as DIS(DD-MMM-YY HH:MM:SS.TT). Generated with a warning about the accuracy of fractional seconds.
TIMESTAMP(0) Yes E E Formatted as DIS(DD-MMM-YY HH:MM:SS)
TIMESTAMP(1) Yes E E12 Formatted as DIS(DD-MMM-YY HH:MM:SS.T)
TIMESTAMP(2) Yes E E13 Formatted as DIS(DD-MMM-YY HH:MM:SS.TT).
TIMESTAMP(n) with n 3 to 9 Yes E E13 Formatted as DIS(DD-MMM-YY HH:MM:SS.TT). Generated with a warning about the accuracy of fractional seconds.
TIMESTAMP WITH TIMEZONE No     Mapping not possible: field is skipped with a warning.
TIMESTAMP(n) WITH TIMEZONE No     Mapping not possible: field is skipped with a warning.
INTERVAL YEAR(year_p) TO MONTH No     Mapping not possible: field is skipped with a warning.
INTERVAL DAY(day_p) TO SECOND No     Mapping not possible: field is skipped with a warning.
RAW(n) Yes R Rn n must be <=255.
LONG RAW Yes R SR* Requires Oracle connector option u4_compatibility.
ROWID No    

Mapping not possible: field is skipped with a warning.

UROWID(n) No    

Mapping not possible: field is skipped with a warning.

BLOB Yes S SR*  
BFILE No     Mapping not possible: field is skipped with a warning.

Related Topics