Show Navigation | Hide Navigation
You are here:
Geodatabases and ArcSDE > Working with geodatabases using SQL

An overview of working with a geodatabase using SQL

Release 9.2
Last modified June 27, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Working with geodatabases using SQL"


For geodatabases implemented in a relational database management system (DBMS) using DBMS data types and table formats, the DBMS’s own Structured Query Language (SQL) may be used to work with the information stored in the database. SQL is a database language that supports data definition and data manipulation commands.

Accessing the information in a geodatabase via SQL allows external applications to access the tabular data managed by the geodatabase. These external applications may be nonspatial database applications or custom spatial applications developed in an environment other than ArcObjects. Be aware, though, that SQL access to the geodatabase bypasses geodatabase functionality, such as topology, networks, terrains, or other class or workspace extensions.

It may be possible to use DBMS features such as triggers and stored procedures to maintain the relationships between tables needed for certain geodatabase functionality. However, executing SQL commands against the database without taking this extra functionality into account—for example, issuing INSERT statements to add records to a business table—will circumvent geodatabase functionality and possibly corrupt the relationships between data in your geodatabase.

The ST_Geometry storage type


Geodatabases in DB2 and Informix use the ST_GEOMETRY SQL data type. You can also use the ST_GEOMETRY spatial data type in your geodatabases stored in Oracle. This data type can be used within the geodatabase plus it provides SQL access to feature class geometry for third-party applications.

ST_GEOMETRY implements the OGC and ISO SQL Multimedia Specification for Spatial. The OGC reference is OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option. The ISO reference is ISO/IEC 13249-3 SQL multimedia and application packages - Part 3: Spatial.

This portion of the help system primarily addresses using SQL with the ST_Geometry type as implemented in Oracle. For example, all of the functions described in this portion of the help are for the ST_Geometry implementation in Oracle. Though some information is provided on using SQL with DB2 and Informix, you should consult the IBM DB2 and Informix documentation for more complete information on using SQL with the ST_Geometry type in these databases. For using SQL with other spatial types, such as Oracle Spatial, consult the documentation for those products.

Using SQL functions with ST_Geometry in Oracle


To access, analyze, and manipulate data using SQL, you need to utilize the functions installed with the ArcSDE component of ArcGIS Server Enterprise edition.
These functions can be grouped based on their use.


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.