NOTE: Creating a table with an ST_Geometry column does not insert ST_Geometry metadata. It is your (or the application's) responsibility to register this metadata information.
Subtypes are used to differentiate feature types within a feature class based on their default values, attribute domains, connectivity rules, and relationship rules. Subtypes are defined for a feature class, and only one field in the feature class can have subtypes defined for it.
Subtypes in ArcCatalog
Since subtypes are defined on the feature class, you define and view subtypes in ArcCatalog from the Feature Class Properties dialog box. Right-click the feature class, click Properties, and click the Subtypes tab to see the following dialog box:
This example shows subtypes applied to the TYPECODE field for a feature class called Laterals. You see the codes used for the subtypes, the descriptions (names) of the subtypes, and the default subtype for the TYPECODE field in the Laterals feature class.
Subtypes in an Oracle DBMS
The following is a diagram of the tables used for subtypes applied to a feature class:
The subtypes for feature classes are tracked in the GDB_SUBTYPE system table, the default values for the subtypes are tracked in the GDB_DEFAULTVALUES system table, and the fields to which these apply are tracked in the GDB_FIELDINFO system table. The subtypes are associated to the feature class by way of the GDB_OBJECTCLASSES table. The GDB_DEFAULTVALUES table is associated with the GDB_SUBTYPES table by the subtype code, which is stored in the SubtypeCode field in the GDB_SUBTYPES table and the Subtype field in the GDB_DEFAULTVALUES table.
The name of the field to which the subtype applies is stored in the SUBTYPEFIELD column of the GDB_OBJECTCLASSES table. This field is linked to the FIELDNAME column in the GDB_FIELDINFO table, which in turn is associated to the FIELDNAME column in the GDB_DEFAULTVALUES table.
Subtypes in an XML document
Subtypes appear in XML documents as part of the information for the feature class. They are grouped under a Subtypes tag. For the Laterals example, the subtype information in an XML document is as follows:
- <Subtypes xsi:type="esri:ArrayOfSubtype">
<Subtype xsi:type="esri:Subtype">
<SubtypeName>Unknown</SubtypeName>
<SubtypeCode>0</SubtypeCode>
<FieldInfos xsi:type="esri:ArrayOfSubtypeFieldInfo">
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>H_CONFID</FieldName>
<DefaultValue xsi:type="xs:int">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DIAMETER</FieldName>
<DomainName>LatDiameter</DomainName>
<DefaultValue xsi:type="xs:double">8</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DEPTH_BURI</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>RECORDED_L</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>WNM_TYPE</FieldName>
<DefaultValue xsi:type="xs:string">WUNKNOWN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>PWTYPE</FieldName>
<DefaultValue xsi:type="xs:string">WUNKNOWN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>MATERIAL</FieldName>
<DomainName>Material</DomainName>
<DefaultValue xsi:type="xs:string">DI</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>TYPECODE</FieldName>
<DefaultValue xsi:type="xs:int">3</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>ENABLED</FieldName>
<DomainName>EnabledDomain</DomainName>
<DefaultValue xsi:type="xs:short">1</DefaultValue>
</SubtypeFieldInfo>
</FieldInfos>
</Subtype>
<Subtype xsi:type="esri:Subtype">
<SubtypeName>Hydrant laterals</SubtypeName>
<SubtypeCode>1</SubtypeCode>
<FieldInfos xsi:type="esri:ArrayOfSubtypeFieldInfo">
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>H_CONFID</FieldName>
<DefaultValue xsi:type="xs:int">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DIAMETER</FieldName>
<DomainName>LatDiameter</DomainName>
<DefaultValue xsi:type="xs:double">8</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DEPTH_BURI</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>RECORDED_L</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>WNM_TYPE</FieldName>
<DefaultValue xsi:type="xs:string">WHYDLIN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>PWTYPE</FieldName>
<DefaultValue xsi:type="xs:string">WHYDLIN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>MATERIAL</FieldName>
<DomainName>Material</DomainName>
<DefaultValue xsi:type="xs:string">DI</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>ENABLED</FieldName>
<DomainName>EnabledDomain</DomainName>
<DefaultValue xsi:type="xs:short">1</DefaultValue>
</SubtypeFieldInfo>
</FieldInfos>
</Subtype>
<Subtype xsi:type="esri:Subtype">
<SubtypeName>Fire laterals</SubtypeName>
<SubtypeCode>2</SubtypeCode>
<FieldInfos xsi:type="esri:ArrayOfSubtypeFieldInfo">
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>H_CONFID</FieldName>
<DefaultValue xsi:type="xs:int">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DIAMETER</FieldName>
<DomainName>LatDiameter</DomainName>
<DefaultValue xsi:type="xs:double">8</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DEPTH_BURI</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>RECORDED_L</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>WNM_TYPE</FieldName>
<DefaultValue xsi:type="xs:string">WFIRELIN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>PWTYPE</FieldName>
<DefaultValue xsi:type="xs:string">WFIRELIN</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>MATERIAL</FieldName>
<DomainName>Material</DomainName>
<DefaultValue xsi:type="xs:string">DI</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>ENABLED</FieldName>
<DomainName>EnabledDomain</DomainName>
<DefaultValue xsi:type="xs:short">1</DefaultValue>
</SubtypeFieldInfo>
</FieldInfos>
</Subtype>
<Subtype xsi:type="esri:Subtype">
<SubtypeName>Service laterals</SubtypeName>
<SubtypeCode>3</SubtypeCode>
<FieldInfos xsi:type="esri:ArrayOfSubtypeFieldInfo">
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>H_CONFID</FieldName>
<DefaultValue xsi:type="xs:int">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DIAMETER</FieldName>
<DomainName>LatDiameter</DomainName>
<DefaultValue xsi:type="xs:double">8</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>DEPTH_BURI</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>RECORDED_L</FieldName>
<DefaultValue xsi:type="xs:double">0</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>WNM_TYPE</FieldName>
<DefaultValue xsi:type="xs:string">WSERVICE</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>PWTYPE</FieldName>
<DefaultValue xsi:type="xs:string">WSERVICE</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>MATERIAL</FieldName>
<DomainName>Material</DomainName>
<DefaultValue xsi:type="xs:string">DI</DefaultValue>
</SubtypeFieldInfo>
<SubtypeFieldInfo xsi:type="esri:SubtypeFieldInfo">
<FieldName>ENABLED</FieldName>
<DomainName>EnabledDomain</DomainName>
<DefaultValue xsi:type="xs:short">1</DefaultValue>
</SubtypeFieldInfo>
</FieldInfos>
</Subtype>
</Subtypes>