How to add your knowledge

Physical to Logical Schema Mapping

    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.

    Oracle 10gR2 Back-End

    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.

    Note

    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.

    Note

    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 NAD83 / 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
    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.

    ColumnArcSDE Type, Length, decimal placesOracle TypeFDO Type
    SMINT4COLSE_INT16, 4NUMBER(4)Int16
    IDSE_UUID, 38CHAR(38)Unmapped
    INT16COLSE_INT16, 4NUMBER(4)Int16
    INT32COLSE_INT32, 10NUMBER(38)Int32
    FLOAT32COLSE_FLOAT32, 6, 2NUMBER(6,2)Single
    FLOAT64COLSE_FLOAT64, 7, 2NUMBER(15,4)Double
    INT10SEINT32, 10NUMBER(10)Int32
    FLOAT4_4SE_FLOAT32, 4, 4NUMBER(4,4)Single
    DOUBLE7_2SE_FLOAT64, 7, 2NUMBER(7,2)Double
    STRING64SE_STRING, 64VARCHAR2(64)String
    BLOBCOLSE_BLOB, 0BLOBBLOB
    CLOBCOLSE_CLOB, 0CLOBUnmapped
    NSTRINGCOLSE_NSTRING, 255NVARCHAR2(255)String
    NCLOBCOLSE_NCLOB, 0NCLOBUnmapped
    DATECOLSE_DATE, 0DATEDateTime
    FEATGEOMSE_SHAPE, 0MDSYS.SDO_GEOMETRYGeometry
    OBJECTIDSE_INT32, 10NUMBER(38)Int32
    Note

    The OBJECTID column was not specified in the -d arguments of the sdetable command.

    Sql Server 2005 Back-End

    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.

    Note

    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.

    Note

    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.

    ColumnArcSDE Type, Length, decimal placesSql Server TypeFDO Type
    SMINT4COLSE_INT16, 4smallintInt16
    IDSE_UUID, 38uniqueidentifierUnmapped
    INT16COLSE_INT16, 4smallintInt16
    INT32COLSE_INT32, 10intInt32
    FLOAT32COLSE_FLOAT32, 6, 2realSingle
    FLOAT64COLSE_FLOAT64, 7, 2floatDouble
    INT10SEINT32, 10intInt32
    FLOAT4_4SE_FLOAT32, 4, 4numeric(4,4)Single
    DOUBLE7_2SE_FLOAT64, 7, 2numeric(7,2)Single
    STRING64SE_STRING, 64varchar(64)String
    BLOBCOLSE_BLOB, 0imageBLOB
    CLOBCOLSE_CLOB, 0textUnmapped
    NSTRINGCOLSE_NSTRING, 255nvarchar(255)String
    NCLOBCOLSE_NCLOB, 0ntextUnmapped
    DATECOLSE_DATE, 0dateDateTime
    FEATGEOMSE_SHAPE, 0intGeometry