Attribute domains are rules that describe the legal values of a field type, providing a method for enforcing data integrity. Attribute domains are used to constrain the values allowed in any particular attribute for a table or feature class. If the features in a feature class or nonspatial objects in a table have been grouped into subtypes, different attribute domains can be assigned to each of the subtypes. A domain is a declaration of acceptable attribute values. Whenever a domain is associated with an attribute field, only the values within that domain are valid for the field. In other words, the field will not accept a value that is not in that domain. Using domains helps ensure data integrity by limiting the choice of values for a particular field.

Attribute domains can be shared across feature classes, tables, and subtypes in a geodatabase.

For example, a feature class for water mains and a feature class that stores water laterals can use the same domain for the ground surface type field.

When you create a domain, you must specify which type of domain you want to use.
There are two types of attribute domains:

  • Range domains—A ranged domain specifies a valid range of values for a numeric attribute. When creating a ranged domain, you enter a minimum and maximum valid value. A range domain can be applied to short-integer, long-integer, float, double, and date attribute types.
    For example, in a feature class for water mains, you could have subtypes for transmission, distribution, and bypass water mains. Distribution water mains can have a pressure between 50 and 75 psi. For a distribution water main object to be valid, its pressure value must be entered as some value between 50 and 75 psi.
    Range domains are validated through the use of the Validate Features command.
  • Coded domains—A coded value domain can apply to any type of attribute—text, numeric, date, and so on. Coded value domains specify a valid set of values for an attribute.
    For example, water mains may be buried under different types of surfaces as signified by a GroundSurfaceType attribute field: pavement, gravel, sand, or none (for exposed water mains). The coded value domain includes both the actual value that is stored in the database (for example, 1 for pavement) and a more user-friendly description of what that value actually means.
    Validation for coded value domains is accomplished by restricting the user to choose field values from a drop-down list.
Advertisement