An overview of subtypes and attribute domains |
|
|
Release 9.1
Last modified April 26, 2005 |
|
ArcGIS provides subtypes and attribute domains to help ensure your data is consistent with the system you are modeling.
Tables and feature classes store objects of the same type—that is, objects that have the same behavior and attributes. For example, a feature class called WaterMains may store pressurized water mains. All water mains have the same behavior and have the attributes ReferenceID, Depth, Material, GroundSurfaceType, Size, and PressureRating.
You may be modeling a system in which water mains can only be made of cast iron, ductile iron, or copper. They can only be a certain size based on their type, and there are four possible ground surface types. When you create a new water main object using the editing tools in ArcMap, you may want these attributes to take on certain default values. Similarly, when you use ArcMap to change values for an attribute, you may want to make sure that only legal or valid values are inserted into the attributes for that lateral.
When an object in a feature class or table has valid values for all of its attributes, it is considered a valid object. If one of its attributes contains an invalid value, it is considered an invalid object. When designing your geodatabase, you can specify what makes any particular object in a feature class or table a valid feature by establishing one or more validation rules.
Although all objects in a feature class or table must have the same behavior and attributes, not all objects must share the same attribute domains. For example, it may be true in a water network that only transmission water mains can have a pressure between 40 and 100 psi, while distribution water mains can have a pressure between 50 and 75 psi. You would use an attribute domain to enforce this restriction. To implement this kind of validation rule, you do not have to create separate feature classes for transmission and distribution water mains, but you would want to distinguish these types of water mains from each other to establish a separate set of domains and default values. You can do this using subtypes.
In addition to topology rules, there are four broad classes of validation rules:
NOTE: ArcInfo and ArcEditor only
NOTE: ArcInfo and ArcEditor only
NOTE: ArcInfo and ArcEditor only
Feature classes and tables can contain subtypes. An object's subtype is determined by its subtype code value. The subtype code is stored in an integer field in the feature class or table. Each subtype can have its own set of default values and attribute domains for a given field and different connectivity rules associated with it.
An important geodatabase design issue arises when you must decide where it is appropriate to use subtypes and where additional feature classes are required. When you are trying to distinguish objects by their default values, attribute domains, connectivity rules, and relationship rules, it is recommended that you create separate subtypes for a single feature class or table.
When you want to distinguish objects based on different behaviors, attributes, access privileges, or whether the objects are multiversioned, you must create additional feature classes.
Attribute domains are rules that describe the legal values of a field type. Multiple feature classes and tables can share attribute domains stored in the database. Therefore, the water mains feature class can use the same domain for the ground surface type field as a feature class that stores water laterals.
Attribute domains are used to constrain the values allowed in any particular attribute for a table, feature class, or subtype. Each feature class or table has a set of attribute domains that apply to different attributes, subtypes, or both. These attribute domains can be shared across feature classes and tables in a geodatabase.
Attribute domains do not have a property that allows or disallows null values in an associated field. When a table or feature class is created in a geodatabase, each field has a property that indicates whether or not null values are permissible values. The database will not permit null values to be inserted into columns that don't support them. Therefore, all domains treat null values as valid values.
There are two types of attribute domains: range domains and coded value domains. Each domain has a name, a description, and a specific attribute type to which it can apply.
When editing your feature classes and tables, you can enforce these rules by validating individual or sets of objects.
Learn more about editing objects with subtypes and validation rules
Often when editing data, a single feature is split into two features or two separate features are combined, or merged, into a single feature. For example, in a landbase database, a land parcel may be split into two separate land parcels due to rezoning. Similar zoning changes may require two adjacent parcels to be merged into a single parcel.
While the result of these types of edit operations on the feature's geometry is easily predictable, their effects on the attribute values are not. The behavior of an attribute's values when a feature is split is controlled by its split policy. When two features are merged, an attribute's value is controlled by its merge policy.
Each attribute domain has both a split policy and a merge policy. When a feature is split or merged, the ArcInfo system looks to these policies to determine what values the resulting feature or features have for a particular attribute.
An exclusive lock is required on a feature class or table to modify its subtypes, default values, and attribute domains.
Learn more about exclusive locks and schema locking