Database Reference
In-Depth Information
Domains
Excellent job with the new changes you introduced to the geodatabase! During the
Bes-
taurant
geodatabase's review workshop, the client pinpointed a small possible area for
improvement when entering the rating for restaurants. They noticed that ArcMap allows
any number for the rating without validating it. It would be better if the geodatabase can
handle this kind of validation and allow the rating to be from 1 to 5 only.
To apply such kind of restrictions and ranges to an attribute, we will introduce a new useful
tool to work with feature classes and domains. A domain is a property of the geodatabase
shared by the individual datasets. This means it should be created on the geodatabase level
and used on the datasets. There are two types of domains: coded values and ranged values.
Coded values are discreet values, whereas ranged values allow a continuous range of val-
ues. Both the domain types have their applications; however, it seems that our case study
can be solved with the coded domain.
We will now create a domain called
RATING_SYSTEM
, which will have the discreet val-
ues 1 to 5. To do this, perform the following steps:
1. Open
ArcCatalog
if it is not open and browse to the
Bestaurants
geodatabase.
2. Right-click on the
Bestaurants
geodatabase and select
Properties
. Make sure
the
Domains
tab is activated.
3. Click on an empty record in the
Domain Name
column and type
RATING_SYSTEM
; optionally, you can type a description of this domain in the
next column.
4. In the
Domain Properties
section, select
Short Integer
from the
Field Type
prop-
erty, select
Coded Values
from the
Domain Type
property, and leave the rest as
default values.
5. Fill the
Coded Values
section with the values given in the following table (code is
what will be stored in the geodatabase physically, and description is what the editor
will see in ArcMap when editing an attribute):
Code
Description
1
Poor
2
Fair