Databases Reference
In-Depth Information
Adding a sequential counter does not increase the overall length of the
entity identifier by much, but it may be enough to raise the issues of DASD
consumption, performance degradation, and installation-specific index
limitations. If the business information originates from an external organi-
zation, the only part of the entity identifier that can be controlled is the
sequential counter.
Substitute Keys
When substitute keys are used, the value of the entity identifier or its
components is abbreviated or encoded to reduce its length. All substitute
values are predetermined to represent a specific business meaning prior to
their assignment as an entity identifier. This is unlike the surrogate key
which has no inherent business meaning and whose value is determined
when it is assigned. The abbreviations for airline carriers and airports are
examples of substitute keys, as follows:
DCA - Washington/National
UA - United Airlines
DFW - Dallas/Fort Worth
US - USAir
An airline flight can be identified by the airport from which the flight
originates, the airport where the flight terminates, the airline carrier, and
the departure date and time. Without the use of substitute keys, the entity
identifier would be 98 bytes in length, as follows:
ORIG_AIRPORT_NM
CHAR(30)
TERM_AIRPORT_NM
CHAR(30)
CARRIER_NM
CHAR(20)
DEPART_DT
DATE
DEPART_TM
TIME
Key Length:
98
When substitute keys for airports and airline carriers are used, the
length of the entity identifier is reduced to 26 bytes, as follows:
ORIG_AIRPORT_CD
CHART(3)
TERM_AIRPORT_CD
CHAR(3)
CARRIER_CD
CHAR(2)
DEPART_DT
DATE
DEPART_TM
TIME
Key Length:
26
Search WWH ::




Custom Search