When you create a table or add a column to a table in a database, you define a specific data type for the column. Data types determine the following:
- What values you can store in the column
- What operations you can use on the data in that column
- How the data in that column is stored in the database
ArcGIS works with specific data types. When you access a database table through a Database Connection, query layer, or web service, ArcGIS filters out any unsupported data types. ArcGIS does not display unsupported data types, and you cannot edit unsupported data types through ArcGIS. Similarly, when you use ArcGIS to copy and paste tables containing unsupported data types from one database to another, ArcGIS only pastes columns that use a supported data type.
The first column in the following table lists the ArcGIS data types. The second column lists the Oracle data type that ArcGIS creates. The third column shows what other Oracle data types (if any) map to the ArcGIS data type when you view a table that you created outside ArcGIS. The last column provides additional information when needed.
ArcGIS data types | Oracle data types created | Other Oracle data types that can be viewed | Notes |
---|---|---|---|
BLOB | BLOB | ||
Date | timestamp | date | |
Double |
number(38,8) | number(p,s) |
The precision and scale specified in ArcGIS can affect the resultant data type created in the database. See ArcGIS field data types for more information. |
Float | number(38,8) | number(p,s) | The precision and scale specified in ArcGIS can affect the resultant data type created in the database. See ArcGIS field data types for more information. |
Geometry |
ST_Geometry, number(38), or SDO_Geometry | The Oracle data type that gets created depends on the geometry storage specified when the feature class is created. Compressed binary or well-known binary (geodatabases only) = number(38); Oracle Spatial = SDO_Geometry; spatial type = ST_Geometry. To use ST_Geometry in a database (not geodatabase), you must install it. | |
Global ID | char or nchar (UUID len) | Only supported in geodatabases. The unique identifier field will be created as nchar if the configuration keyword with which you specified the table's creation had the parameter UNICODE_STRING set to TRUE. | |
GUID |
char or nchar (UUID len) | The unique identifier field will be created as nchar in a geodatabase if the configuration keyword with which you specified the table's creation had the parameter UNICODE_STRING set to TRUE. | |
Long Integer |
number(38) | number(n) | The value n can be in the range of 5 to 10. If created with ArcGIS Desktop or ArcObjects and precision is set to 0, a number(38) is created in the database; otherwise, the precision specified is used. |
Object ID |
number(38) when created in an enterprise geodatabase number(38) with sequence and trigger when created in the following circumstances:
number(38) generated always as identity when you use ArcGIS to create a feature class or table in an Oracle 12c database or use the Add Incrementing ID Field geoprocessing tool to add an ID field to a table in an Oracle 12c database. | The ArcGIS type ObjectID is the registered row ID column for the table (or feature class). Only one can exist per table. | |
Raster | BLOB or number(38) | Rasters are only supported in geodatabases. The data type used for the raster field depends on the configuration keyword you specify when you create a mosaic dataset or raster dataset. | |
Short Integer |
number(5) | number(n) | The value n can be in the range of 1 to 5. However, short integer columns can only store values that fall in the range -32,768 to 32,767. Even if the precision on the number is 5, you cannot store a number greater than 32,767 or less than -32,768 in a short integer column. When created with ArcGIS Desktop, n = 5. This allows you to store short integers that fall within the allowable range. |
Text |
varchar2, CLOB, nvarchar2, or NCLOB |
Text data types
When you choose to include a text field in the table you create using ArcGIS, the varchar2 data type is used if the database is not set to use Unicode encoding. If you set the text field size larger than 4,000 and the database is not set to use Unicode encoding, the Oracle data type will be CLOB.
A text field will be created as nvarchar2 if the database is set to use Unicode encoding. (This is the default setting for geodatabases in Oracle.) If you set the text field size larger than 2,000 and the database is set to use Unicode encoding, the Oracle data type will be NCLOB.
Geometry data types
ArcGIS creates and can work with three geometry data types in Oracle: Esri ST_Geometry, Oracle SDO_Geometry, and compressed binary. Compressed binary geometry storage can only be used in geodatabases.
ST_Geometry
The ST_Geometry data type implements the SQL 3 specification of user-defined data types (UDTs), allowing you to create columns capable of storing spatial data such as the location of a landmark, a street, or a parcel of land. It provides International Organization for Standards (ISO) and Open Geospatial Consortium, Inc. (OGC) compliant structured query language (SQL) access to the geodatabase and database. This storage extends the capabilities of the database by providing storage for objects (points, lines, and polygons) that represent geographic features. It was designed to make efficient use of database resources, to be compatible with database features such as replication and partitioning, and to provide rapid access to spatial data.
For more information, see ST_Geometry in Oracle.
SDO_Geometry
SDO_Geometry is implemented using an Oracle extensible object-relational-type system. The SDO_Geometry type is offered by Oracle using two primary options:
- Oracle Spatial is an optional feature of the Oracle Database Enterprise Edition. In addition to providing the SDO_Geometry type, Oracle Spatial provides a number of additional geospatial capabilities.
- Oracle Locator provides a subset of Oracle Spatial capabilities. It is included as a standard feature of Oracle Database Standard and Enterprise editions. Among other capabilities, it provides the Oracle Spatial geometry type (referred to as SDO_Geometry) and a SQL API to this content.
ArcGIS supports SDO_Geometry as an optional method to store spatial data. Specifically, Oracle Spatial or Locator geometry can be used to store and manage the feature and raster contents of datasets in enterprise geodatabases or Oracle databases.
For information on SDO_Geometry, consult Oracle documentation.
Compressed binary
The Esri compressed binary storage type uses a binary storage mechanism for storing feature geometry. A compressed binary feature class is composed of three tables: the business table, feature table, and spatial index table.
After verifying the geometry, the client application compresses and sends it to the geodatabase, where it is stored in compressed binary format in a feature table, or F table. Compressing the geometry on the client unloads the task from the database server and reduces the transmission time to send the geometry. It also offers efficient storage and retrieval of spatial data by reducing the space required to store data by as much as 40 percent.
The business table contains attributes and a spatial column. The spatial column is a key to the feature and spatial index tables.
The relationship between the business table and feature table is managed through the spatial column and the feature ID (FID) column. This key, which is maintained by ArcGIS, is unique.
Raster data types
You should use a configuration keyword that contains the RASTER_STORAGE parameter set to RASTERBLOB when you create raster datasets and mosaic datasets in geodatabases in Oracle.