ArcGIS Server Banner

Domains in a geodatabase stored in PostgreSQL

Domains in a geodatabase stored in PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
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 An overview of attribute domains.

Domains in ArcCatalog

The domains for a geodatabase are accessed in ArcCatalog by way of the Database Properties dialog box. Right-click the geodatabase and click Properties.

Domains on the Database Properties dialog box

In the example above, 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 list, the Transportation_BridgeCategory domain is a coded domain.

When a domain is applied to a subtype, it is listed on 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 are only able to 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 DBMS

In the database, domains are stored in the system tables gdb_domains. Coded domains are tracked in the gdb_codeddomains system table, and range domains are tracked in the gdb_rangedomains system table.

The gdb_fieldinfo system table stores one record for every field in every user-defined table in the geodatabase. This table also stores the name of the domain (if any) that is associated with each field.

The gdb_attrrules table stores the name of a field, the name of the domain associated with that field, the subtype code for the feature class, and the rule ID.

The following are the domain system tables. Dashed lines indicate an implicit relationship between tables.

System tables that track domains in PostgreSQL

Domains in an XML workspace document

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

The lines in an XML workspace document for the Transportation_BridgeCategory domain are as follows:

<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 Transportation_BridgeCategory domain is a coded domain. The entries for a range domain called RotAngle in an XML workspace document are shown below:

<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>