Présentation rapide de l'utilisation de SQL avec les types ST_Geometry et ST_Raster

You can use the database management system's (DBMS) Structured Query Language (SQL), data types, and table formats to work with the information stored in a geodatabase. 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 work with the tabular data managed by the geodatabase. These external applications can be nonspatial database applications or custom spatial applications developed in an environment other than ArcObjects.

You can issue SELECT statements against any of the supported DBMS types for geodatabases, as well as against file-based data sources. The topics About building a SQL expression and SQL reference provide you with information about building SELECT statements for different data sources.

AttentionAttention :

Be aware that using SQL to access the geodatabase bypasses geodatabase functionality, such as versioning, topology, networks, terrains, feature-linked annotation, 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 or adding a column to an existing feature class—will circumvent geodatabase functionality and possibly corrupt the relationships between data in your geodatabase.

In general, the following guidelines apply when using SQL to modify information in the geodatabase:

The preceding guidelines apply to any attribute, spatial or nonspatial. This book of the help focuses on using SQL for spatial selections, altering data, and altering the properties of data stored in the ST_Geometry and ST_Raster data storage types.

Type de stockage ST_Geometry

The ST_Geometry SQL data type is used in geodatabases stored in DB2, Informix, Oracle, and PostgreSQL. This data type can be used within the geodatabase plus it provides SQL access to simple 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, version 1.1.0. The ISO reference is ISO/IEC 13249-3 SQL multimedia and application packages—Part 3: Spatial.

For information on using SQL with the ST_Geomery type in DB2 or Informix, consult the IBM DB2 and Informix documentation. For information on using SQL with the ST_Geometry type in Oracle and PostgreSQL, see the subsequent section.

AstuceAstuce :

The "Using spatial types with SQL" section of this help does contain some examples for DB2 and Informix; however, for complete information on using ST_Geometry with these databases, read the IBM documentation.

Utilisation de fonctions SQL avec ST_Geometry dans Oracle et PostgreSQL

Pour accéder à des données à l'aide de SQL, les analyser et les manipuler, vous devez utiliser les fonctions installées avec ArcSDE.

Ces fonctions peuvent être groupées selon leur utilisation.

Type de stockage ST_Raster

Vous pouvez utiliser le type de données ST_Raster dans vos géodatabases ArcSDE. Outre le fait que ce type de données peut être utilisé dans la géodatabase, il fournit un accès SQL aux données raster pour les applications tierces.

Le type ST_Raster est disponible dans les géodatabases ArcSDE Oracle, PostgreSQL et Microsoft SQL Server.

Deux catégories différentes de fonctions ST_Raster permettent d'accéder au type ST_Raster avec SQL :

Fonctions ST_Raster et ST_PixelData

Ces méthodes instancient et utilisent l'objet ST_Raster.

Utilitaires de procédures stockées ST_RasterUtil

Les procédures stockées ST_RasterUtil prennent en charge la création et la maintenance du type ST_Raster. Les fonctions disponibles sont les suivantes :

ST_RasterUtil_checkLibraryVersion

ST_RasterUtil.describe

ST_RasterUtil.getVersion

ST_RasterUtil_getLibraryVersion

ST_RasterUtil.initialize

Rubriques connexes


7/10/2012