6.5 Mapping Oracle Database Types to PGX Types

Learn how the input Oracle database types are mapped to its corresponding PGX types, when a graph from the database is loaded into the graph server (PGX).

The following table applies for both SQL property graphs and PGQL property graphs.

Table 6-1 Mapping Oracle Database Types to PGX Types

Oracle Database TypeFoot 1 PGX Type
NUMBER The following implicit type conversion rules apply:
  • NUMBER => LONG (for key columns)
  • NUMBER => DOUBLE (for non-key columns)
  • NUMBER(m) with m <= 9 => INTEGER
  • NUMBER(m) with 9 < m <= 18 => LONG
  • NUMBER(m,n) => DOUBLE

In the preceding entries, m is the variable for precision and n is the variable for scale.

CHAR or NCHAR STRING
VARCHAR, VARCHAR2, or NVARCHAR2 STRING
BINARY_FLOAT FLOAT
BINARY_DOUBLE DOUBLE
FLOAT The following implicit type conversion rules apply:
  • FLOAT(m) with m <= 23 => FLOAT
  • FLOAT(m) with 23 < m => DOUBLE

In the preceding entries, m is the variable for precision.

DATE or TIMESTAMP TIMESTAMP
TIMESTAMP WITH LOCAL TIME ZONE TIMESTAMP
TIMESTAMP WITH TIME ZONE TIMESTAMP WITH TIME ZONE

Footnote 1 Data types for PGQL property graphs and SQL Property Graphs share a one-to-one mapping with Oracle Database data types.