When FDO describes the schema of an existing table that was not created by the ApplySchema command, it maps native data types to FDO data types. The ArcSDE provider talks to the ArcSDE server. The server uses either Oracle or Sql Server as the back-end data store technology. So two schema mappins are described here.
The schema name is the name of the user supplied as the value of the Username connection parameter. The class name is the name of the table created using the sdetable command. The property names are the column names.
The following ArcSDE commands were used to create a table. The sdetable creates a business table. The sdelayer command converts the business table into a feature class table.
The sdetable -i option designates the ArcSDE server instance against which to apply the command. The value can be a symbolic name or a port number. If the value is a symbolic name, the symbolic name must be mapped to a tcp port number in the C:\WINDOWS\system32\drivers\etc\services file.
The sdelayer -e argument “np” means that the geometry is either a 2D point or NULL. The -l argument “existingtable,featgeom means a geometry column called featgeom in a table called existingtable. The -E argument “empty” means that the layer envelope is empty. The -P argument “32” means that the geometry is stored with 32-bit precision. The -t argument “S” means that the storage type used for the geometry is Oracle Spatial. The -G argument “26910” is the SRID of a coordinate system in the pedef.h file as well as in the Oracle mdsys.cs_srs table. You can access this file by googling “pedef.h”. It contains the following line: #define PE_PCS_NAD_1983_UTM_10N 26910 /* NAD 1983 UTM Zone 10N */. The sqlplus command select cs_name from mdsys.cs_srs where srid = 26910; returns .
sdetable -o create -t existingtable -d “smInt4Col smallint(4), int16Col int16, int32Col int32, float32Col float32, florat64Col float64, int10 integer(10), float4_4 float(4,4), double7_2 double(7,2), string64 string(64), blobCol blob, clobCol clob, id uuid, nStringCol nstring, nClobCol nclob, dateCol date” -u existinguser -p test -i esri_sde sdelayer -o add -l existingtable,featgeom -e np -E empty -i esri_sde -u existinguser -p test -G 26910 -P 32 -t S
The following table maps the output of the sdetable -o describe command to the output of the sqlplus desc command to the output of the FDO DescribeSchema command.
| Column | ArcSDE Type, Length, decimal places | Oracle Type | FDO Type |
|---|---|---|---|
| SMINT4COL | SE_INT16, 4 | NUMBER(4) | Int16 |
| ID | SE_UUID, 38 | CHAR(38) | Unmapped |
| INT16COL | SE_INT16, 4 | NUMBER(4) | Int16 |
| INT32COL | SE_INT32, 10 | NUMBER(38) | Int32 |
| FLOAT32COL | SE_FLOAT32, 6, 2 | NUMBER(6,2) | Single |
| FLOAT64COL | SE_FLOAT64, 7, 2 | NUMBER(15,4) | Double |
| INT10 | SEINT32, 10 | NUMBER(10) | Int32 |
| FLOAT4_4 | SE_FLOAT32, 4, 4 | NUMBER(4,4) | Single |
| DOUBLE7_2 | SE_FLOAT64, 7, 2 | NUMBER(7,2) | Double |
| STRING64 | SE_STRING, 64 | VARCHAR2(64) | String |
| BLOBCOL | SE_BLOB, 0 | BLOB | BLOB |
| CLOBCOL | SE_CLOB, 0 | CLOB | Unmapped |
| NSTRINGCOL | SE_NSTRING, 255 | NVARCHAR2(255) | String |
| NCLOBCOL | SE_NCLOB, 0 | NCLOB | Unmapped |
| DATECOL | SE_DATE, 0 | DATE | DateTime |
| FEATGEOM | SE_SHAPE, 0 | MDSYS.SDO_GEOMETRY | Geometry |
| OBJECTID | SE_INT32, 10 | NUMBER(38) | Int32 |
The schema name is the name of the user supplied as the value of the Username connection parameter prefixed by “SDE_”. The class name is the name of the table created using the sdetable command. The property names are the column names.
The following ArcSDE commands were used to create a table. The sdetable creates a business table. The sdelayer command converts the business table into a feature class table.
The sdetable -i option designates the ArcSDE server instance against which to apply the command. The value can be a symbolic name or a port number. If the value is a symbolic name, the symbolic name must be mapped to a tcp port number in the C:\WINDOWS\system32\drivers\etc\services file.
The sdelayer -e argument “np” means that the geometry is either a 2D point or NULL. The -l argument “existingtable,featgeom means a geometry column called featgeom in a table called existingtable. The -E argument “empty” means that the layer envelope is empty. The -P argument “32” means that the geometry is stored with 32-bit precision. The -t argument “B” means that the storage type used for the geometry is Esri Binary. The -G argument “26910” is the SRID of a coordinate system in the pedef.h file as well as in the Oracle mdsys.cs_srs table. You can access this file by googling “pedef.h”. It contains the following line: #define PE_PCS_NAD_1983_UTM_10N 26910 /* NAD 1983 UTM Zone 10N */.
sdetable -o create -t existingtable -d “smInt4Col smallint(4), int16Col int16, int32Col int32, float32Col float32, florat64Col float64, int10 integer(10), float4_4 float(4,4), double7_2 double(7,2), string64 string(64), blobCol blob, clobCol clob, id uuid, nStringCol nstring, nClobCol nclob, dateCol date” -u existinguser -p test -i esri_sde_ss sdelayer -o add -l existingtable,featgeom -e np -E empty -i esri_sde_ss -u existinguser -p test -G 26910 -P 32 -t B
The following table maps the output of the sdetable -o describe command to the output of the sqlplus desc command to the output of the FDO DescribeSchema command.
| Column | ArcSDE Type, Length, decimal places | Sql Server Type | FDO Type |
|---|---|---|---|
| SMINT4COL | SE_INT16, 4 | smallint | Int16 |
| ID | SE_UUID, 38 | uniqueidentifier | Unmapped |
| INT16COL | SE_INT16, 4 | smallint | Int16 |
| INT32COL | SE_INT32, 10 | int | Int32 |
| FLOAT32COL | SE_FLOAT32, 6, 2 | real | Single |
| FLOAT64COL | SE_FLOAT64, 7, 2 | float | Double |
| INT10 | SEINT32, 10 | int | Int32 |
| FLOAT4_4 | SE_FLOAT32, 4, 4 | numeric(4,4) | Single |
| DOUBLE7_2 | SE_FLOAT64, 7, 2 | numeric(7,2) | Single |
| STRING64 | SE_STRING, 64 | varchar(64) | String |
| BLOBCOL | SE_BLOB, 0 | image | BLOB |
| CLOBCOL | SE_CLOB, 0 | text | Unmapped |
| NSTRINGCOL | SE_NSTRING, 255 | nvarchar(255) | String |
| NCLOBCOL | SE_NCLOB, 0 | ntext | Unmapped |
| DATECOL | SE_DATE, 0 | date | DateTime |
| FEATGEOM | SE_SHAPE, 0 | int | Geometry |