Database Reference
In-Depth Information
Althougha“greaterthanorequalto”comparisonisgenerallyacceptableinanumericfield,
it is not appropriate in this instance; there is no valid reason for him to make this type of
comparison.
Similarly, it would be pointless for him to make a comparison between a given E MPLOYEE
ID N UMBER value and the value of another numeric field within the EMPLOYEES table or
some other table within the database; therefore, a comparison such as this is invalid:
Is an Employee ID Number in the Employees table greater than
or equal to a Quantity On Hand in the Products table?
It is both suitable and reasonable, however, for him to make a comparison between a given
E MPLOYEE ID N UMBER value within the EMPLOYEES table and another E MPLOYEE ID
N UMBER value within a related data table or related subset table. This comparison, then, is
a valid one:
Is an Employee ID Number in the Employees table equal to an
Employee ID Number in the Part-Time Employees table?
There are instances when it is perfectly suitable for the user to compare a particular value
ofonefield tothevalue ofacompletely different field. Forexample, itistotally logical for
him to make the following comparison between a D ATE S HIPPED field and a D ATE O RDERED
field:
Is the current value of Date Shipped greater than or equal to the
current value of Date Ordered?
It'sfortunatethathecanmakethistypeofcomparison—hecertainlydoesn'twantthevalue
of D ATE S HIPPED to be earlier than the value of D ATE O RDERED !
AsyousettheComparisons Allowedelement foragivenfield,thinkabouthowyou'rego-
ingtousethefield'svaluessothatyoucandesignatetheappropriatecomparisons.It'svery
likely that you'll review this element later in the design process when you establish table
relationships and define business rules.
Operations Allowed
This element specifies the types of operations that a user can perform on the field's values.
Therearefivetypesofoperations:addition(+),subtraction(-),multiplication (×),division
(÷), and concatenation. (Obviously, any combination of these operations is valid as well.)
This element also indicates whether an operation can incorporate
• Another value within the same field
• A value from another field within the parent table or from some other table in the
database
Search WWH ::




Custom Search