Domains in a geodatabase stored in PostgreSQL

Domains are rules applied to a field in a business table. They enforce data integrity by allowing only those values specified for the domain to be entered into the field. Domains are defined for the geodatabase and can be applied to multiple feature classes, tables, or subtypes.

There are two types of domains you can define—range domains and coded domains. Range domains can only be applied to numeric fields. For an explanation of domains, see A quick tour of attribute domains.

Domains in ArcGIS Desktop

The domains for a geodatabase are accessed in the Catalog window through the Database Properties dialog box. Right-click the geodatabase, and click Properties.

Domains on the Database Properties dialog box

In the previous example, the list of all the domains defined for a geodatabase are listed at the top of the dialog box. The Transportation_BridgeCategory domain is selected in the list. The Domain Properties and Coded Values shown pertain to this selected domain. As shown in the Domain Properties, the Transportation_BridgeCategory domain is a coded domain.

When a domain is applied to a subtype, it will be listed in the Subtype tab of the Feature Class Properties dialog box. Right-click the feature class and click Properties.

Domains on a feature class subtype

The Transportation_BridgeCategory domain is being applied to the bridgecategory field of the TransportationL feature class.

When you edit the attributes of the TransportationL feature class in ArcMap, you can only enter one of the codes specified for the Transportation_BridgeCategory domain in the bridgecategory field.

Drop-down list of possible values for the bridgecategory field

Domains in a PostgreSQL database

In the database, all domains are stored in the gdb_items system table. A field in the gdb_itemtypes table identifies the object as a domain.

Domains in an XML workspace document

Domains in XML workspace documents are enclosed with a Domain tag.

The following is a portion of an XML workspace document that contains the definition of the Transportation_BridgeCategory coded value domain:

<Domain xsi:type="esri:CodedValueDomain">
    <DomainName>Transportation_BridgeCategory</DomainName> 
    <FieldType>esriFieldTypeInteger</FieldType> 
    <MergePolicy>esriMPTDefaultValue</MergePolicy> 
    <SplitPolicy>esriSPTDuplicate</SplitPolicy> 
    <Description /> 
    <Owner>hbear</Owner> 
     <CodedValues xsi:type="esri:ArrayOfCodedValue">
       <CodedValue xsi:type="esri:CodedValue">
        <Name>Unspecified</Name> 
        <Code xsi:type="xs:int">0</Code> 
       </CodedValue>
     <CodedValue xsi:type="esri:CodedValue">
        <Name>Not Covered/Not Decked</Name> 
        <Code xsi:type="xs:int">1</Code> 
     </CodedValue>
     <CodedValue xsi:type="esri:CodedValue">
        <Name>Covered/Not Decked</Name> 
        <Code xsi:type="xs:int">2</Code> 
     </CodedValue>
     <CodedValue xsi:type="esri:CodedValue">
        <Name>Covered/Decked</Name> 
        <Code xsi:type="xs:int">3</Code> 
     </CodedValue>
     <CodedValue xsi:type="esri:CodedValue">
        <Name>Not Covered/Decked</Name> 
        <Code xsi:type="xs:int">4</Code> 
     </CodedValue>
     <CodedValue xsi:type="esri:CodedValue">
        <Name>Not Applicable</Name> 
        <Code xsi:type="xs:int">99</Code> 
     </CodedValue>
    </CodedValues>
  </Domain>

The entries for a range domain, RotAngle, in an XML workspace document are shown here:

<Domain xsi:type="esri:RangeDomain">
  <DomainName>RotAngle</DomainName> 
  <FieldType>esriFieldTypeInteger</FieldType> 
  <MergePolicy>esriMPTDefaultValue</MergePolicy> 
  <SplitPolicy>esriSPTDuplicate</SplitPolicy> 
  <Description>Valid rotation angles</Description> 
  <Owner>hbear</Owner> 
  <MaxValue xsi:type="xs:double">359</MaxValue> 
  <MinValue xsi:type="xs:double">0</MinValue> 
 </Domain>

8/19/2013