Database Reference
In-Depth Information
• The result of a value expression (which, as you recall, is itself some form of opera-
tion involving field values, literal values, or a combination of both, that returns a
single value)
Youcanpreventtheuserfromdefiningmeaningless operationsbylimiting thetypesofop-
erationsthathecanperformonthefield'svalues.Let'sconsidertheE
MPLOYEE
IDN
UMBER
,
D
ATE
S
HIPPED
, and D
ATE
O
RDERED
fields once again. There is no reason for the user to
perform mathematical operations on a pair of E
MPLOYEE
ID N
UMBER
values within the
EMPLOYEES table, nor is there any reason for him to perform such operations using a
given E
MPLOYEE
ID N
UMBER
value and some other numeric field's value. In the case of
the D
ATE
S
HIPPED
field, however, it
is
suitable to perform some of these operations using
a given D
ATE
S
HIPPED
value and the value of some other appropriate date field within the
database. For example, the user might need to subtract D
ATE
O
RDERED
from D
ATE
S
HIPPED
to determine the time that elapsed between the date that the customer placed the order and
the date that the items within the order were shipped to the customer.
AsyousettheOperationsAllowedelementforagivenfield,thinkabouthowyou'regoing
tousethefield'svaluessothatyoucandesignatetheappropriateoperations.It'sverylikely
that you'll review this element later in the design process as you define business rules.
Figure 9.7
shows the Logical Elements section of a Field Specifications sheet for an
E
MPLOYEE
ID N
UMBER
field.