Field values are, by default, unrestricted text strings. However, it is often useful to impose some restrictions on the values of certain fields. For example, consider the following record:
Id: 111 Name: Jose E. Marchesi Age: 30 MaritalStatus: single Phone: +49 666 666 66
The values of the fields must clearly follow some structure in order
to make sense.
Id is a numeric identifier for a
Name will never use several lines.
typically be in the range
0..120, and there are only a few
valid values for
MaritalStatus: single, married, divorced, and
Phones may be restricted to some standard format as well to be valid.
All these restrictions (and many others) can be enforced by using
There are two kind of field types: anonymous and named. Those are described in the following subsections.