Database Reference
In-Depth Information
Logical Elements
This category pertains mainly tothe values within afield. Itselements governmatters such
as whether each value should be unique, when a value should be entered, whether a value
can be edited, and the types of comparisons and operations that can be performed on each
value. Setting these elements helps you establish and enforce a large part of field-level in-
tegrity.
Key Type
This element designates a field's role within a table, which you identified as you were es-
tablishing a primary key for the table. As you already know, a field can serve as a non-key,
a primary key, or an alternate key. In
Chapter 10
,
you'll learn all about
foreign
keys and
when to designate a field as a foreign key on the Field Specifications sheet.
Key Structure
This element denotes whether a field designated as a primary key is acting as a simple
(single-field) primary key or as part of a composite (multifield) primary key.
Uniqueness
Thiselementindicateswhetherafield'svaluesareunique.Yousetitas“Unique”whenthe
Key Type
element is set to “Primary”; otherwise, you'll typically set this element as “Non-
unique.”
Whenyouworkwitha
non-key
field,thinkabouthowitsvaluesaregoingtobeusedsothat
you can determine whether they should be unique. Consider the DEPARTMENTS table
structure in
Figure 9.6
.
Figure 9.6. Should the values of E
MPLOYEE
ID N
UMBER
be unique?