Thursday, November 27, 2008

Subtypes and Domains. What is what?

Subtypes, range domains and coded value domains. These are all terms that you may have heard tossed around in the ESRI world. But what exactly are they, and when should you use them? Here is a brief overview of the different terms.

Domains
Domains are rules that are applied to individual attributes that define the possible values for that property. There are two types of Domains in a Geodatabase: Range domains and Coded Value Domains.

Range Domains, as the name suggests, enforce a valid range of numerical values for an attribute. For example, an Age attribute for a Person feature class could be restricted from 0 to 100, meaning that all values between 0 and 100 are valid.

Coded Value Domains enforce a fixed list of values on a field, on any text, numeric or date field. These can be thought of as a look up table, as you can have a different code (the value that is actually stored in the field) to the description (the value that is displayed to the user when entering data). For example, a cadastral parcels feature class may have a zone property defining whether the property is residential (zone 1), commercial (zone 2) or industrial (zone 3). Coded value domains allow you to store the zone number, but display the more meaningful description to the users.

Subtypes
Subtypes are a sub-category of features in a feature class, that all share common properties (attributes). For example, you maye have a feature class of Animals, which you wish to categorise into species. In this case, the species would be the subtype.

The advantage of using subtypes is that you can specify different domains based on the subtype. Using the animals example again, you may have a height attribute with an associated range domain. You would most probably want a different range domain for elephants than for mice. Subtypes allow you to do this.

Subtypes and Domains in ArcPad
The good news is that since the release of ArcPad 7.1 and the new AXF file format, ArcPad directly supports subtypes and domains. This way all of your Geodatabase rules can be enforced at the time of collection in the field, making the data migration process from the field back to the office all the more easier.

No comments: