Professional Documents
Culture Documents
Lefkovitz1969 Book FileStructuresForOn-LineSystem
Lefkovitz1969 Book FileStructuresForOn-LineSystem
Staff Consultant
Computer Command and Control Company
Philadelphia
~ Spartan Books
Macmillan Education
Dedicated to the memory of my father
Joseph Lefkovitz
3 4 5 6 7 8 9 PRINTING
75 76 77 78 YEAR
PREFACE
Appendix C 202
BiblIography 211
Index 213
CHAPTER I
I
2 FILE STRUCTURES FOR ON-LINE SYSTEMS
Documents Documents
Dota
Documents
Reduction
Documents Documents
Dota Dota
User Interface
Dota
Table 1
FUNCTIONAL COMPONENTS OF AN INFORMATION SYSTEM
Input Devices
pen
typewriter
copier
printer
paper tape and punch card
optical scanner
tape recorder
CRT/keyboard/light pen
electro writer
sheet paper
punched cards
microfilm
magnetics (analog and
digital)
Output Devices
typewriter
computer printer
microfilm reader
tape recorder
CRT
slide or film projector
Retrieval Mechanisms
catalog cards
punched cards
coordinate index cards
EDP serial systems
EDP random systems
THE INFORMATION SYSTEM 9
The solid lines of Fig. 2 designate the data flow of fi:e generation
and update, where the final procedure in the generation of files is the
creation of the Directory and File of the reference file system.
The broken lines in the figure indicate data retrieval processes, and
are initiated at the bottom of the diagram by the User. It is assumed
here that the interface to the system is automated via a typewriter or
cathode-ray tube console. A System Executive program monitors
multiple consoles in a large scale on-line system, and particular queries
to the file are transmitted from the Executive to the Query Processor
which decodes or translates from User oriented key terminology and
syntax into the appropriate File ,record addresses by interpreting the
syntax of key expressions and then using the Directory as a table
look-up. The outputs of the Query Processor are (1) Presearch Sta-
tistics that may be returned to the console via the Executive, and
(2) Appropriate Record Addresses, transmitted from the Query
Processor to the File Processor, which controls the DASD acces-
sions and may further qualify record retrievals according to query
specification; File responses are then transmitted back to the con-
sole via the System Executive. In some systems the console in-
cludes a high-speed line printer for more voluminous output, and
this printer may either be on-site at the computer center or may
be on long distance telephone lines remote from the computer. After
communication with the Reference File via the Executive-Query
Processor-File Processor-Executive cycle, the User may communi-
cate with the Microfilm and Hard-copy Files, as indicated by the
directed dashed line in Fig. 2, and by the corresponding directed line
in Fig. 1.
As in the telephone system, the User and Generator sometimes
interchange roles in the information system, and the latter may use
the system in essentially a User oriented mode. Such may be the case
for on-line, real-time Reference File. update from a system console.
This procedure is indicated by the solid lines interconnecting the
console, Executive, Query and File Processors. The "queries" are
now file update commands with data modifications as operands. The
"Query" Processor must interrogate the Directory, as in true query
mode, in order to locate the record address, or addresses, to be up-
dated. These are transmitted to the File Processor, which executes
the indicated update. If the update involves the relocation of a record
in the File or the addition or deletion of keys to or from a record, then
the Directory address references to the File must also be updated.
A system response to the User/Generator indicating completion of
Primary Data Source .....
~
'r1
I o
~
Ll
Microfilm
o
Document O'Irectory File F"lie ,
z,
and t""
File "
Hard Copy Files , I Z
ttl
, 1 ~
Vl
- _ - / - __1 >-l
trI
I I , ~
Vl
, I L __ -,
" Multi Console I
System
- Data Storage Executive
~----~,
IL ____________________ _ I ,
--- Data Retrieval
Fig. 2. Data Flow in the System
THE INFORMATION SYSTEM 15
the update may then be made via the normal User oriented (broken
line) channel of communication. This may be as simple as a state-
ment from the Executive-"update complete"-or it may be a display
of the updated record.
Since systems with high performance processors, large capacity
DASD, and telecommunications represent a considerable investment
in both hardware and software design, implementation and main-
tenance, the performance of these information systems should con-
stantly be monitored and periodically evaluated against the original
design standards as well as ad hoc criteria established from time to
time by users of the system. This may be achieved by programming
an Automonitor that can be interrogated by system management per-
sonnel to determine how the system is being utilized and how effec-
tively it is providing its intended service. For this purpose a system
operations file is maintained, and information of a statistical and
usage nature will flow from the File Processor to the System Manage-
ment Automonitor where it will be appropriately processed and stored
for later correlations and interrogation. The System Manager may
then make the appropriate interrogations and obtain statistical sum-
maries via his console.
In this way the system can be modified as deficiencies are detected
by significant deviations from the standards. For example, if the
relevance of recall is below standard, then the key vocabulary, the
quality of indexing, and the retrieval strategies of Users should be
examined. If recall is incomplete, then consistency of indexing and
the use of synonyms should be examined. If the system response time
is too low, then an improvement in retrieval technique may be indi-
cated, a hardware improvement at a system bottleneck may be re-
quired, or, in some of the file structuring techniques to be described,
a modification of an operational parameter may be attempted.
Another function of the System Manager and the Automonitor
could be to maintain file integrity, where users may restrict file access
selectively in multifile, multiuser systems);,l This means that certain
files or portions thereof have access and update authorization that is
limited, and the integrity of these files is maintained automatically by
programs in the Automonitor, while administration of the system is
under the cognizance of the System Manager.
It is intended in Fig. 2 to provide a perspective from which to view
the flow of data into, through, and out of the automated system, and
it is now appropriate to focus yet a little closer to the subject of this
book, which is enclosed within the dashed box of this figure. The
16 FILE STRUCTURES FOR ON-LINE SYSTEMS
IL _ _ _ _ _ _ _ _ _
2.4 5
......
Fig. 3. Software Mechanisms of a Real-time Retrieval System ....J
18 FILE STRUCTURES FOR ON-LINE SYSTEMS
size and total system requirements. For example, the functions of the
two Executives are normally exclusive, although, if core space were
available, the Off-line functions could be performed as background on
a low priority basis. The On-line Executive, however, must reside
in core whenever the system is responsive to on-line operation, but
none of the other programs, except a part of the Input/Output Pro-
gram, has to reside permanently in core. It is the sole function of the
Executive to sequence and call the appropriate subprograms for ex-
ecution in accordance with an established processing schedule. If the
system also has the ability to time-share queries from the consoles,
then the Executive has the additional function of scheduling the sub-
program calls according to priorities of the moment and a predeter-
mined time-sharing algorithm. The decision as to whether the
Executive or the initiating subprograms should respond to the Operat-
ing (OP) System I/O interrupts is for the designer to decide; this
usually depends upon the specific form of the time-sharing algorithm
and upon the operational environment of the information system. For
example, if the total system is dedicated to the information system, and
if subprograms are not shuttled from core to peripheral storage during
the execution of one of the subprogram's jobs, then it is simpler (and
the resident executive is smaller) to have the subprogram execute
its own I/O through the OP System. On the other hand, if a more
sophisticated time-shared system is envisioned, where subprograms
can be interrupted by the On-line Executive and removed from core,
then the Executive should handle I/O since an interrupt response may
be required when the subprogram is temporarily out of core. Simi-
larly, if the information system is itself a job within a larger time-
shared system environment, tilen I/O from the information system
may be less complex, with respect to the general system time-sharing
executive, if it were centralized in the On-line Executive.
The Input/Output Program (6) buffers incoming messages onto
an I/O file (F-8) and transmits responses from this same file through
the Executive back to the console via the Operating System.
The two routes of data communication from the Executive are to
the Input/Output Program (6) and the Query Interpreter (3). In
both cases, the Executive performs little or no processing, but is
merely a switching mechanism that provides a communication path
between the OP System and the I/O Program and between the I/O
Program and the Query Processor. The I/O Program collects the
input query a character or a line at a time, depending on the terminal
device buffering and upon the OP System buffering. In some systems
THE INFORMATION SYSTEM 19
the System Executive and the OP System. The File Supervisor (4.2)
can also modify and restore records in F-1 and initiate an update of
the Directory, via Block 5, in response to an on-line file update. The
Job Supervisor (4.1) places the job (i.e. the query) into a QEA in
core or in disk, depending upon the availability of core space at the
moment, and controls switching from one query to another in accord-
ance with the retrieval of records from the file by the File Supervisor.
When the Job Supervisor transmits a retrieved record to a particular
QEA, it causes the selection of an Application Program (7), which
was specified by the Query Interpreter and transfers control to the
application program with a data linkage to the respective QEA. The
Table 2
LEGEND FOR FIGURE 3
1. System Executive
1.1 Off·line Executive
1.2 On·line Executive
2. Off·Line File Generation
2.1 Record formating
2.2 Partitioned file generation
2.3 Batched record addition/deletion/modification
2.4 Key directory construction
3. Query Interpreter
4. Storage and Retrieval Time·Sharing Executive
4.1 Job Supervisor
4.2 File Supervisor
5. Directory Decoding and Updating
6. Input/Output Program
7. Application Program
7.1 Intrarecord processing
7.2 Interrecord processing
7.3 On·line file updates
7.3.1 Record addition/deletion
7.3.2 Key addition/deletion/modification
7.3.3 Non·key data addition/deletion/modification
8. Background File Maintenance (space brooming)
F-l Data File
F-2 Key Directory
F-3 File Access Codes
F-4 User Term Definitions, Synonyms, and Program Names
F-5 Universal Synonyms and Program Names
F-6 Intermediate File
F-7 Program File
F-8 I/O File
application programs are usually quite numerous since they may per-
form a variety of processes on the records, depending upon the speci-
fication in the query; hence, they may be stored in their own Program
File (F-7). Furthermore, the processing may involve a number of
THE INFORMA nON SYSTEM 21
OP System
USER's
Compiler
Program
4.2 5
Op System
USER's
Compiler
Program
In Fig. 4, the Basic Retrieval System consists only of blocks 4.2 and
5, the File Supervisor and Directory Decoder. Furthermore, it can
only retrieve records from the DASD, not update. All file updates
and maintenance are performed in batches through programs 2.1 to
24 FILE STRUCTURES FOR ON-LINE SYSTEMS
Op System
1.2 6
I QEA 7
27
28 FILE STRUCTURES FOR ON-LINE SYSTEMS
Table 3
CLASSES OF DIRECT ACCESS STORAGE DEVICES
• The particular breaks and heights indicated are for the IBM Data Cell.
ACCESS
TIME
the central processor within a few tens of milliseconds for some equip-
Il1ent types, and within a few hundreds of milliseconds for others. The
magnetic tape, in contrast, is not designed for the random accession
of data within a narrow time range, but rather starts the transmission
at the beginning of the tape reel, and transmits all information serially,
whether or not it is required for processing by the computer; since it
takes approximately five minutes to pass a reel of magnetic tape, the
average time to reach an arbitrarily located character string on the
tape starting from the beginning, would be about two and a half min-
utes, and to reach it from an arbitrarily located standing position
would be about one-third of five minutes or one and two-thirds
minutes. Therefore, the random accession time constant differential
between these two device types is around three orders of magnitude.
In summary, the primary function of the magnetic tape is to provide
large capacity peripheral storage to a digital computer, where the
processing of this data is to be modular in size units of around 15
million characters, and time units of five minutes, whereas the primary
function of the DASD is also to provide large scale peripheral storage
to a digital computer, but where the modularity in size varies from a
few hundred thousand characters up to a half billion characters (in
present-day equipment), and the modularity in time units is in the
range of ten to 500 milliseconds. In terms of cost the most commonly
used high-speed tape units purchase for around $30,000 per tape
drive, and a disk system with a comparable modular capacity (i.e.,
15 million characters) would purchase for around $40,000 although
as the on-line capacity of the device increases, the cost increase is
less than proportional. Furthermore, the lower performance direct
access storage devices (e.g. Data Cell) are available at a considerably
lower cost per on-line character of information.
In Fig. 8 the construction of the fixed head or head per track-disk
file is illustrated. These systems have a series of aluminum disks with
a magnetic iron oxide surface coating like tape onto which digital data
can be written and read by recording heads that float on a cushion of
air a fraction of a mil from, but never touching, the disk surface.
The disk surface contains concentric recording tracks packed approxi-
mately 50 per inch. The only movable part is the disk, which rotates
in a period, typically, of 25 milliseconds. * Each surface has a read/
write recording head for each track, and all of the heads are anchored
to a block. Data can be transmitted to or from one track at a time,
and switching from one track to another is electronically controlled,
since there is a head permanently positioned to service each track.
This means that its characteristic, in terms of Fig. 7, has no breaks,
as indicated by Table 3. If the device can only commence reading or
writing from an initial track index, then, the time, Tn to access data
at position x (measured, say, in degrees of rotation from the index),
from a given head position y would be
Tr =( 1
- v) R ,
+ X 360' (1)
In general, the head per track devices operate in neither mode, but
read in relatively small data units such as groups of eight bytes, so
that the actual access time would be close but not exactly equal to
formulations (2). The access time, in either case, is a linear function
of the shortest distance between the two addresses. Furthermore, the
two addresses need not be on the same track since the electronic head
switching time is negligible compared with even small fractions of R.
Therefore, the distance between addresses is the projected differential
onto a single disk surface, which means that in the first case, the maxi-
mum effective address distance throughout the entire medium is 720°
(x - y = 360° - d, and the average access time is R; in the second
case the maximum effective address distance is 360°, the maximum
access time is R and the average access time is 1h R.
The important timing concepts for this class of device (which is a
subtype of the other two classes) are (l) latency, which is the time
elapsed from initiation of the I/O command by the processor until
the first character to be transmitted is under the read/write head, and
the electronic circuitry is prepared to transmit, and (2) record trans-
mission, which is the time to transmit the record. The latency time
is given by the above expressions, while transmission time is simply
the ratio of the number of characters to be transmitted to the serial
DIRECT ACCESS STORAGE DEVICES 31
riTi'i~irTi'i~i~-----------------~
------------11--------'~'~!~!~!~!~!~-------------_-_-_--_~
I
I
I
I
I I
I I
I I
"- """-- --"'"
.I
,.....
~
•
Fig. 9. Mechanical Construction of the Movable Head Disk
timing concepts and typical values for these three device classes are
presented in Table 4. It should be noted that there are a variety of
commercial equipments within each of these classes with widely vary-
ing parameters. For example, Burroughs intends to market a series
of fixed head disks in which R is as high as 60 and as low as 17 milli-
seconds.
Appendix C cont~ins a representative sample of available DASDs
and their operational characteristics. By forming a composite in mean
access time (Head Position plus latency), and cost per character for
the three DASD types from data extracted from Appendix C, and by
compiling the same data for large scale core (8 microsecond access)
and magnetic tapes, the graph of Fig. 11 results. It presents two kinds
of relationships, the On-line Cost per Character and the Off-line Cost
per Character of various devices, plotted against the Mean Access
Time of the device as an independent variable. The solid line indi-
cates On-line Cost, which is to be interpreted as the cost of a char-
Table 4
TYPICAL TIMING PARAMETERS OF DIRECT ACCESS
STORAGE DEVICES
R= 25-50 ms
.;- 1000 .; 10
'2 "-
-CD
o
u
;;
tTl
.... 230
-0
"- rl
"- 0 -l
CD
.&:
,,
U 100 U >
0 . ~.9 rl
-"-
0
"-
CD
D-
rl
tTl
.&:
CIl
U CIl
I/)
"- 0
- ~.26 CIl
'" ,,
CD U
D- .'9 -l
'3 CD
o
I/) 10 c .I \..._-- :00
-0 >
u :.::i Cl
tTl
CD C
c 0 1-.035
3 -~ otTl
:.::i
1.8
---- '20\ !i
rl
'/' I .02 _ .0......1. .5 .......
1\.....'5_0
_ _ _---'
0 .01 tTl
CIl
- t 10- 5 V .01 + +.1 + 10 1001t 1000
DISK DISK STRIP HYPER TAPE TAPE
CORE PACK
t...)
Fig. 11. Cost/Access Time Trade-Offs VI
36 FILE STRUCTURES FOR ON-LINE SYSTEMS
these devices is higher than for tape. The fixed head disks and core
storage would be recommended only on the basis of their perform-
ance, since they come at a considerably higher cost than the other
storages, and do not provide off-line modular storage. The broken
curve, which represents Off-line Costs, corresponds only to the cost of
the storage magazine such as the tape reel, the Data Cell or the Disk
Pack, and, as can be seen from the graph, the cost of storing infor-
mation on the shelf via tape is an order of magnitude less than the
shelf cost of the Disk Pack. This would indicate that for batched
processing, where large archival files of data are to be stored at
relatively low cost, the magnetic tapes are still to be preferred.
CHAPTER III
37
w
00
for file partitioning that is a hybrid of serial and list processing will
also be described.
The file should be susceptive of muItikey logical retrieval. This
statement contains three concepts that must be carefully defined; they
are (1) key, (2) muItikey, and (3) logical. Functionally, a key rep-
resents a single file partition or list; structurally it is a subfield of a
record, being some digitally representable character (or bit) string a.
Then, every record in' the file that contains, as a subfield of some
commonly identified field (called the field of the keys), the string a
is said to be in the file partition characterized by the key a. Further-
more, this partition contains no records without the string a in the key
field. To the user of the system, a key is a descriptive element of
information pertaining to the record. For example Author/Smith or
Citizenship /USA.
The second and third concepts (or rather the implied functional
requirements) cause a number of problems, which turn out to be the
primary concern of this book. The multiple key and logical require-
ment means that retrievals may be specified by more than a single key,
and that a logical combination of these keys must also be satisfied. The
most frequently used logic functions are the Boolean operators AND,
OR, and NOT, although others such as threshold (i.e., m out of n)
functions and weighted threshold functions have also been used. Since
a single key corresponds to an individually retrievable file partition,
the muItikey query requires that combinative sets of partitions be re-
trieved. For example, the key expression A AND B implies that the
intersection of partitions A and B be retrieved. The files should there-
fore be organized in such a way as to minimize the number of records
that have to be transferred from the DASD to the processor in order
to satisfy this muItikey expression. By definition, the maximum num-
ber of transmissions need be no greater than the smaller of the par-
titions A and B; however, improvements are possible by more highly
organizing the key Directory, but there is a price to be paid for such
an increase in retrieval efficiency, which constitutes a design trade-off.
There are very few design problems in single key systems since com-
plete partitions are always retrieved, and, as will be shown, the gen-
eration and retrieval of these partitions is relatively easy. However,
even the single key systems divide into two types-the single record
partitions and multiple record partitions. The first is a very special
system type, although there are many of them in existence today. Each
key in these systems represents a unique record. An example is a
bank system in which each account has a record containing an ac-
40 FILE STRUCTURES FOR ON-LINE SYSTEMS
part of the file, while other systems are so dynamic in their update
transaction rate that space brooming must be brought in as back-
ground work, and is so designed as to be interruptable after a few
seconds operation leaving the file in a completely useable state.
...
1/1
QI
....
:::J
...
tJ
:::J
iii
c:
0
:;:::;
('II
...
E
.E
E.
QI
>
:;:::;
('II
'0
0
1/1
1/1
<
'0
c:
('II
tJ
:c
-
~
...
('II
-
,~
J:
0
tJ
:;:::;
I ('II
E
I QI
.r:
tJ
I en
I
I
I M
....
/ I tlO
/ I i.i:
/ u'"
- >
:J:j::
UC(
C -
C(U
cO
",1/1
-1/1
:J:C(
INFORMATION STRUCTURE AND FILE ORGANIZATION 45
Z
'11
o~
a::
VOUCH ~
~
~
~
c::
n
-l
c::
Accoun t /I n voice ~
Chain
~
.... 1 o
'11
....
t"'
ttl
~
Z
Invoice/Item ~
Chain
~
D Malter Record
~
D Detail Record
50 FILE STRUCTURES FOR ON-LINE SYSTEMS
the Hierarchic Structure. For example, one might say that alI records
relating to ACCT # 1 should be contained within a single logical
record. This would then include the three records shown in the
Account/Voucher Chain, the two records contained in the Ac-
count/Invoice Chain, and the two and three records, respectively,
contained in the Invoice/Item Chains. There arises then the question
of the logical relationship between the INVTY record and the ACCT
record, which is interlinked in this case through two of the ITEM
records. The technique that is used in the General Electric IDS sys-
tem &voids the requirement to make such decisions, because each
record (rectangular block of Fig. 15) is its own logical record and
can be addressed independently of all other records.
There are, however, certain processing advantages that may accrue
from contiguous storage of hierarchically related records. Most
prominent among these advantages is the ability to process all records
in a chain without requiring multiple random accessions or intricate
paging techniques.
Figure 16 presents a Record Format (data structure) with the kind
of controls that would be needed to establish the Hierarchic relations
among subtile records, but which permits contiguous storage of all
hierarchically related records, where particular subfiles have been
previously selected for inclusion within a logical record. To make
these notions more specific, the following terminology has been
adopted. Each of the dots in Fig. 13, or each of the rectangular blocks
in Fig. 15 is called a Detail. (Generically, a Master can be considered
a Detail of itself.) All Details within a common subfile, as indicated
by a rectangular block in Fig. 13 or a chain of Fig. 15, are collected
into a subrecord; hence, a com·mon format can be associated with all
Details within a given subrecord. A logical record consists of a series
of subrecords headed by a subrecord that contains a single Master.
The data storage in a logical record is contiguous within the DASD,
except possibly for individual subrecord trailers, where a trailer may
be randomly dislocated from its parent subrecord, or from a previous
trailer. The Master subrecord contains a record index that indicates
by means of a link address the beginning of each subrecord that is
chained to the Master. This address is a character or word position
indicator relative to the beginning of the logical record. Each sub-
record has a name, and this name along with the link address appears
within the record index.
Within each subrecord appear a series of Detail records, where a
Detail is identified by a Detail Name/Value pair. The Detail Name
INFORMATION STRUCTURE AND FILE ORGANIZATION 51
is actually the same as the subrecord name, and the Detail Values
serve to differentiate one Detail from another. However, it is not
necessarily the case that all values of Detail Names must be distinct,
because the values may be assigned independently, as they may ap-
pear on different chains. For example, in terms of the example illus-
trated in Fig. 15, all blocks labeled ITEM will appear in the Item
subrecord, but there are, in the illustration of this example, three
ITEM chains, two being associated with the INVC and one with the
INVTY. These chains may, by nature of the system, be independent
with regard to the assignment of values to the Detail (in this case
ITEM); thus, the Detail Name/Value equal to ITEM # 1 is as-
signed twice, since there is an ITEM # 1 relative to INVC # 1 and
INVC #2. Both of these will appear as distinct Details within the
subrecord whose name is ITEM.
In Fig. 16 the first Detail subrecord, which begins at address £'1,
contains the link address control information in a Detail index that
appears within every Detail record. This index contains a listing of
Subrecord Name/Link Address pairs, where the Link Addresses may
be of two types. The first is a Link Address within the same sub-
record, and the second is a Link Address out of the subrecord. In
both cases the Link Addresses are again indexes that are relative to
the beginning of the logical record. The Link Addresses (such as
LA,¥2, as shown in the diagram) within the sub record are chain ad-
dresses indicating another Detail within the subrecord to which the
given Detail is to be linked. For example, in terms of Fig. 15, ITEM
# 1 on the INVC # 1 chain would be linked to ITEM # 2 within
the subrecord. The Link Address out of the subrecord (such as LAYl
in Fig. 16) indicates either a Master-to-initial Detail linkage or, if it
is desired to complete the circuit, a final Detail-to-Master linkage.
Every Detail contains this index, which effectively creates the
Hierarchic Structure among all Masters and Details.
There are two possible instances where a link must be made to
an address that cannot be indexed relative to the beginning of the
logical record. The first of these is a linkage to another logical rec-
ord. For example, in Fig. 15, if INVTY were to be a complete logical
record, and if ITEM were to be within the logical record of ACCT,
then the record index of the Master sub record of INVTY would have
to refer to a dummy subrecord within the INVTY logical record,
which in turn would link to a particular Detail in the ACCT logical
record. This linkage would have to be an absolute address reference
to the ACCT # 1 record plus a relative address to the particular De-
tail within a subrecord.
52 FILE STRUCTURES FOR ON-LINE SYSTEMS
Master Name/Value
Record Index
Master • Subrecord Name/LAa,
·Subrecord Name/LA~,
•
Detail Index
·Subrecord Name/LAa2
•
•
Detail •
• Subrecord Name/LAY2
J_LLLJ_LL.LJ_LL
Detail Name/Value
L. ..1---1_L L L L L L ..L...i_1..
••
•
~, Detail Name/Value
...L-I.....I-I_L L L L..L...L...i_1..
~2 Detail Name/Value
L.L ..L. ..L ...L ...L ...L - ' J_L L
Detail Name/Value
..L...i ....I-I_LLL..L -L. -'J_
Unk Address to Tra i ler
Figure 17 illustrates this data structure for the example of Fig. 14.
It has been decided here that the ACCT, VOUCH, INVC, and ITEM
records of Fig. 14 are to be included in one logical record with Master
Name ACCT, and INVTY is to be a complete logical record by itself.
The Master record contains the Master Name ACCT and a Value
# 1. The index indicates the initial relative position of each subrecord
chained to this Master. It is assumed a priori that alI Details have
some inferior relationship to the Master record, although a given
Detail may not necessarily be directly related to the Master within the
hierarchy. The first subrecord is INVC, and starts at location al. The
first Detail is INVC # I, and has both types of linkage. The chain
linkage carries the subrecord name of the Master (ACCT), and links
to another Detail within the same sub record, namely at. At a:! is the
second Detail on the chain (lNVC #2), which contains a linkage
with Master Name ACCT and a Link Address referring to the origin
of the logical record, which is the Master record. This completes the
Account/Invoice Chain.
The Inventory record contains only the Master for INVTY # 18,
and a single Item subrecord reference to ('II, which is an indirect ad-
dress reference to the ITEM detail at 0100/')12. In the index of Detail
Item # 2 (at Y2), the Inventory/Item Chain is appropriately refer-
enced with a Link Address continuation of ')13, and then back to the
Inventory record, itself, via the indirect address Y6.
54 FILE STRUCTURES FOR ON-LINE SYSTEMS
/1, VOUCH .,
ACCT//12 ITEM*I
L.L.J.....iJ_LLL INVC/Y4
/1 2 VOUCH =-2
INVTY/Y6
ACCT//1! ..I.~-'-..L.£~~
..I..-'-'-'-'-'-''''''/' Y4
ITEM*2
TRA'LER ADDRESS 0250
", ITEM . ,
INVC/Y2 Y5
INVC/Y5
LLLLLLL
ITEM*3
-'-1-1-1-'-./-1-'- INVC/a2
"2 ITEM #2 -'-'-'...L...L.LL
Y6 L'NK ADDRESS 0600
--------
Keys
• Key NamelValuel Link Address
• Key NamelValuel Link Address
•
•
•
Qualifiers
• Qualifier Name/Val'ul
• Qualifier Namel Value
•
••
Data
ReCord]
[
Data
Fig. 18. Associative Controls and Data Storage of the
Generalized Record Format
INFORMATION STRUCTURE AND FILE ORGANIZATION 57
The inverted list technique also requires the Key Link Addresses,
but in this file structure the list control information is distributed
somewhat differently. The Link Addresses are removed from the
individual records and stored in compact, sequenced lists elsewhere
in the DASD; therefore, the Link Addresses do not appear explicitly
within the records as shown in the figure, but they do exist nonetheless
in the file system, and their function is unchanged.
It should be noted that the system that lists Values rather than Key
Name/Value pairs will operate less efficiently by virtue of having
some longer list searches, where the query is specified in terms of Key
Name/Value pairs; however, the Value listing system has an added
degree of flexibility in that the user is not required to give the Key
Name in the query, and this could be an advantage either because he
may not know the Key Name or because he intentionally wants to
see all records with a given Key Value regardless of its Key Name.
For example, consider the Key Names AUTHOR and PRINCIPAL
INVESTIGATOR. The value SMITH could appropriately be as-
signed to either of these Key Names. In that system which lists only
Key Values, one could retrieve the list of all SMITHs regardless of
whether they were AUTHORs or PRINCIPAL INVESTIGATORs,
or it could retrieve, selectively, AUTHOR/SMITH or PRINCIPAL
INVESTIGATOR/SMITH, by searching the SMITH list and quali-
fying each record for retrieval when it is brought into core by ex-
amining the respe<..tive Key Names. On the other hand, the system
that lists Key Name/Value pairs could only search for all SMITHs
via the query AUTHOR/SMITH or PRINCIPAL INVESTI-
GATOR/SMITH, and this requires that the user know that the Key
Names AUTHOR and PRINCIPAL INVESTIGATOR are those that
are likely to produce values SMITH; in fact; there may be other Key
Names that could also produce the value SMITH of which he may
be unaware.
Each Detail record would normally be identified by a record acces-
sion number in addition to a Detail Name. It is generally desirable
to make the accession number a key of list length one so that retrieval
of Details could also be made by accession number. This is par-
ticularly useful in systems with real-time update. After the Detail
record accession number might appear certain control information
such as an access key that controls query access to this particular
Detail record via a code presented in the query. In some systems a
control such as this may not be necessary, but rather it may be suffi-
cient to control access to the entire logical record or to an entire list
58 FILE STRUCTURES FOR ON-LINE SYSTEMS
before the file is searched. Having the access key within the Detail
record permits files to contain different kinds of records with different
levels of user access. This topic will be discussed again in Chapter IV.
In addition to the record access key, another type of control might
be record usage statistics. In its most simple form, this could be a
count of the number of times the Detail record is accessed from the
DASD, based upon a list search, and the number of times it satisfies
a retrieval request. More detailed statistics relating to the usage of
individual keys and qualifiers and even user feedback on the utility
or relevance of the record might also be stored. However, if such
detailed data were to be retained it would probably be more expedient
to store them in an auxiliary file rather than continually updating the
Detail record.
It should be assumed that these records are of variable length.
Firstly, because all possible Key and Qualifiers Names will, in general,
not appear within each record, and those that do appear may vary in
length, and secondly, because the amount of print data may vary from
one record to another. Therefore, it is necessary to have a table of
contents that indicates the number of Keys and Qualifiers, and if it
is also the case that the values can be variable in length, then the
length of every such Key and Qualifier mu<;t also be given. It may
also be desirable to code every Key Name and Qualifier Name nu-
merically, creating a type code to be entered into the table of contents.
It would then be relatively easy for the program to scan the table of
contents in order to determine whether or not the particular Key and
Qualifier Names are present in the given record. Alternatively, this
could be done by an actual scan of the Key and Qualifier fields.
In addition to defining the length of the Key and Qualifier fields,
the table of contents should point to the beginning of the DATA field.
The table of contents and the Key and Qualifier fields represent the
associative information structure controls. The Detail accession num-
ber and control information are part of the IS & R file management
system. All of the remaining data in the record, i.e., that which is
not relevant to either the hierarchic or associative information struc-
ture or to the file management, is labeled DATA in Fig. 18, and would
be formated, internally, within this block, in any desired manner. It
could, for example, have its own table of contents if the format were
variable. Furthermore, different files might have their own DATA for-
mat, but all would be common to the storage and retrieval system
with regard to the information structure controls of Master, Detail,
Keys, and Qualifiers. In this way the IS & R system looks to the
INFORMATION STRUCTURE AND FILE ORGANIZATION 59
60
THE QUERY LANGUAGE 61
both of these are interfaces that are susceptive of some distortion. The
former can be distorted if the programmers of the IS & R system do
not accurately portray the information structure in the file structure,
and the latter will be distorted if either the IS & R programmers fail
to deliver all of the file structure and the processing power through
the language (perhaps diluted rather than distorted) or the user fails
to understand and properly utilize the language. This leads to the im-
portant issue of linguistic structure, for which there are two extremes.
Flexibility and expressive power come to language by virtue of an
enriched vocabulary and a syntax that is context sensitive. These two
factors usually lead to ambiguity in the language, as is certainly the
case with all natural languages. At the other extreme are the purely
mechanical languages, like machine code and most compliers, in
which the vocabulary is very limited and the syntax is context free.
At the present time, a natural-like language that would be trans-
latable to the context free, limited vocabulary compiler or assembler
format for machine execution is, at the present state of the art,
infeasible, and the limited version of such a language that might
be feasible imposes the burden (on the user) of learning the ex-
ceptions (i.e., what not to do) as well as the correct constructions.
And this situation might sooner be rejected by nonprogrammer
users than the purely mechanical, programming-like language. It
should be noted that the issue here is not so much the vocabulary
of command terms (or verbs as they are sometimes called) and
other auxiliary control words, but the syntax of the language. That is,
the rules governing the combinative use of the terms, or the phrase
structure. The inclusion of vocabulary terms like do, find, get, if, etc.
into a compiler is in reality no more an attribute of natural language
than an equivalent use of numeric codes in their stead, because if
someone substituted make for do, the statement would be unintel-
ligible, unless the two words were made equivalent in the language
processor. Or, the phrase do later would not cause any delayed ac-
tion unless the word later were a legal word of the vocabulary, and
unless it had the appropriate connotation to the program and the
syntactic rule existed for allowing the combination do later to be
meaningfully translated into the appropriate machine program. In·
fact, if the query processor were written, as some are, to ignore non-
authorized vocabulary words, then the deception is carried that much
further, and the serious user might actually become frustrated because
of the failure of the system to properly respond to his statements.
A more practical reason for avoiding natural-like language is the
62 FILE STRUCTURES FOR ON-LINE SYSTEMS
expense involved in writing it. Thus, not only may the user response
to these languages be negative (although there are always a few who
are enchanted by the anthropomorphism), but they will also be very
costly.
Therefore, it is here recommended that query languages for the
information systems to be designed over the next five years may be
very close in structure to compiler languages, although a number of
syntactic and semantic conveniences can be introduced. Furthermore,
and most importantly, the user should be guided, as far as possible,
through the query process in such a way as to insure that the best
possible match is made between his natural thought processes re-
garding file handling and the machine's internal organization of these
same files. This returns to the notion of the query language as a
"clutch. "
A stylized, highly controlled and guided query format should not
necessarily be viewed, restrictive as it may seem, as being deleterious
to overall system performance, since it is often the case that imprecise
questions result in expensive and useless searches. A useful approach
that is being widely pursued today is that of the man-machine dia-
logue, wherein precise and highly formated information is provided
to the automated system by the user in relatively small amounts, and
the system, in turn, responds with statistics relevant to an impending
search, or with certain tables or tutorials that will assist the user in
the further formulation of his query.
The very sophisticated query language would be oriented both
toward application programmers as well as non programmer users, and
would therefore be procedure as well as task oriented so that the full
capabilities of the computer could be brought to bear on intra and
interrecord processing. It can be written as a sublanguage of a com-
piler so that the file management functions referred to in the previous
chapter would be available to the applications programmer who uses
the compiler. It can also function as an interactive language for the
nonprogrammer user, although for this purpose the statements of the
language would be executed interpretively, since line by line edit and
execution would be desirable for an effective man-machine inter-
action. This also makes the file management operations, from the
viewpoint of the programmer as well as the nonprogrammer user,
machine independent.
To be more specific, the query language and its associated processor
must enable as a minimum:
1) Retrieval based on the use of keys and qualifiers.
THE QUERY LANGUAGE 63
DATA CONDITIONS
KI (key nome R value)
K 2 (key nome R value)
•
•
•
C I (qualifier nome R value)
C2 (qualifier nome R value)
•
•
•
PROCESSING (A function of KI, K2, ... CI,C2 ...l
• Intra - Record Logic Functions
• Inter- Record Processing
OUTPUT FORMAT
• Titles
• Formatting Print Statements
Fig. 19. A Prototype Query Format
OUTPUT DEVICE
TYP
DATA CONDITIONS
KI( NAME = SMITH
K2(AGE .BTW. 21.30)
K3(KI*= GORDON)
K4(JOB=PROGRAMMER)
CI (LOCN=PHILA)
C2 (DRAFT = IA)
PROCESSING
INTRA
File 1= K2 (KI+ ('\IK4) K3)CI('\I C2)
INTER
FOR FILE I
FI LE 2 = SORT AGE
OUTPUT FORMAT
(LI) TAB 20:'PROGRAMMER LISTING"
(L3F) WHOLE RECORD FILE 2
Philadelphia and are not of draft status 1A ." It should be noted that
the directory look-up will indicate that a list search is possible, be-
cause there is at least one nonnegated key in every disjunct of this
expression (when the expression is put into disjunctive normal form);
however, the conditions Cl and NOT C2 can only be imposed once
the record has been brought into the core memory from the DASD.
The second part of the PROCESSING, which effectively produces
the report, is interpreted as follows. For every record in FILE 1,
produce a second file, labeled FILE 2, which is sorted according to
the values of the field named AGE. The underlines in the figure are
illustrative only, and indicate functions or command types of the query
processor. The use of indents in these examples, to indicate scope of
control of a FOR statement, is also illustrative, but it may have a
practical value as well, because nonprogrammers are not accustomed
to in-line nesting procedures, whereas programmers and scientists use
them continually in the form of indexes and parentheses. The indent
is a more natural loop or indexing control and nesting format for a
nonprogrammer to use, and he could be taught its use without ever
hearing the words index, loop, or nest. Some terminal devices, like
the Dura Mach 10, have a coded tab key that could be used to signal
indents.
Since the accessed subfile (FILE 1) in this example contains the
entirety of every retrieved record, the argument of the function SORT
may be any field name appearing within the records of the file to
which this query is submitted, and it need not necessarily appear as
a name of one of the labeled DATA CONDITIONS. For example,
this line could have read: FILE 2 = Sort SS NUMBER, in which
case FILE 2 would be produced in a sequence according to the social
security number of the individuals. Note also that FILE 2 in this
example would consist of the entire record, since no specific extrac-
tion of data elements has been requested.
In the OUTPUT FORMAT, a fairly straightforward and simple
line editing procedure is to require that the user indicate either the
line or the beginning of a succession of lines on which various titles
and data are to be displayed. Thus (L 1) in Fig. 20 means line 1.
TAB is a query processor function that will cause the output device
to tab a specified number of spaces, in this case 20. Alphanumerics
enclosed by quotes are to be literally printed; therefore, the effect of
72 FILE STRUCTURES FOR ON-LINE SYSTEMS
PROCESSING
INTRA
FILE 1= 01 AND 02
FILE 2= ('" 01 AND (02 OR 03)
INTER
FOR FILE I
TI = TALLY 01
SI= SUM ACTION AMOUNT
FOR FILE 2
FILE 3 _ SORT 01*
FOR FILE 3, SAME 01*
T2= TALLY
S2 = SUM ACTION AMOUNT
PRINT (I)
OUTPUT FORMAT
TOTAL ACTIONS 8
TOTAL DOLLARS $ 325,800
OUTPUT DEVICE
LINE PRINTER
DATA CONDITIONS
AI (SEX- M)
A2 (AGE .GT. AVERAGE (AGE»
A3 (SALARY .GT. MAX (RENT + LlVEXP)
PROCESSING
INTRA
FILE I-AI AND A2 AND A3
INTER
FOR FILE I
FILE 2 = NAME,ADDRESS, A2* , A3*
FOR FILE 2
FILE 3 =SORT A3 *, NAME
OUTPUT FORMAT
(LlF) WHOLE RECORD FILE 3
UPDATE
DATA CONDITIONS
AI (ACC NO.: 67215)
A2 (GRADE = 67)
PROCESSING
INTRA
FILEI=AI
FOR FILE I
DELETE KEY GRADE
ADD KEY A2
UPDATE
OUTPUT DEVICE
TYP
DATA CON DITIONS
B (YEAR .BTW. 1966,1969)
C(TYPE - XL78)
o (STR COL PLAN NO. 8765231E)
PROCESSING
INTRA
FILE I - BAND C
INTER
FOR FILE I
DELETE DATA F7
ADD DATA F7 0
RESTORE FILE I
OUTPUT FORMAT
(LIF) DATA FILE I
Fig. 25. Sample Query (Update) 5
CHAPTER V
CLASSIFICATION OF FILE
ORGANIZATION TECHNIQUES
82
CLASSIFICATION OF FILE ORGANIZATION TECHNIQUES 83
that directly communicate with these files are also identified in Fig. 26.
The remote terminal interfacing to the system through the Input/
Output Program is as described in Chapter I, Fig. 3. The Query In-
terpreter divides the information in the prototype format into two
data streams. One flows to the Directory Decoder and the other to the
File Search Executive. The solid blocks in Fig. 26 indicate the major
system component programs, the DASD symbols designate the files of
interest (in particular, the list structured file system) and the broken
line blocks indicate specific information transmissions or buffers. The
data stream to the Directory Decoder consists of the query 10, the
retrieval keys and retrieval conditions and functions, as expressed
in the OAT A CONDITIONS and PROCESSING sections of the
query, respectively.
The key Directory Decoder translates from the natural language
Key Name/Value pairs (or Values, depending upon the list approach)
to an address or series of addresses that may point to the head of a
list in the file, to a series of heads of lists in the file, or, in the case
of the Inverted List system, to every record in the file that satisfies
the key conditions. The information required to perform this decoding
is contained in the DASD in a table called the Key Directory. In
addition to transmission of these addresses, the Directory Decoder can
also provide presearch retrieval statistics, which indicate an upper
bound on the ultimate retrieval. As will later be shown, various list
structuring techniques provide different qualities of retrieval statistics.
Both the statistics and the list addresses are transmitted to the Search
Executive.
This Executive corresponds to block 4.2 in Fig. 3, and in systems
that are to provide multiterminal, real-time response this Executive
might also enable multi asking either in the sense of controlling a series
of processors, (mUltiprocessing) each identified in Fig. 26 as a Query
Execution Area (QEA), or in a simulated mUltiprocessing mode,
where each QEA is a core partition, and the Executive performs a
switching function among the various QEAs, thus enabling N queries
to time-share both the processor and the files.
The second data stream from the Query Processor feeds directly
to the Search Executive. This consists also of the query 10, the
COMMAND, the DATA CONDITIONS, PROCESSING functions,
OUTPUT DEVICE and OUTPUT FORMAT. The Multiprocessing
Executive assigns a QEA to every query in real-time execution.
Within this area are placed the query parameters and the list
addresses.
00
~
I I Ire:::
,------,I ;:;
Input /Output : Input / 1
Progrom '"11
....
I Output , t""
ttl
t I ... Buffer _ ,
CIl
L _ _ _ _ -.J >..,]
Query ~
Interpreter c:
('")
>..,]
c:~
---. r---'---, ttl
CIl
r---- L
10 I I 10 I '"11
'Command I I Keys 1 List Structur d o~
I Conditions I L Retrieva I ..J File System
I Retrieva I I Keys1- - ~I
I Output Device , t""
Ir-.,
I/t----::>-,I Z
L_~utP~~ormat _.J 1 ttl
Pre Search Directory 1 ,
1 Key
Retrieva I Decoder , ~
CIl
1 Director.,!... >..,]
Multiasking Search Statistics I ....... , ttl
I ~
Executive 1 CIl
List Addresses I
I 'fC ~ I
File Search 1 I
r---, File I
rQEA,1 r QEA 21..J -- - QEA n.J
L..: _ _
L.: ___ J L ___ 1l _____.,.- I
..J
Fig. 26. The System Block Diagram
CLASSIFICATION OF FILE ORGANIZATION TECHNIQUES 85
~
~
~
o-,l
ttl
~
Unique Sampling g
ttl
(Jl
• This same type of list structure has also appeared in the literature as k,lOlted list. (See
Bibliography [91).
90 FILE STRUCTURES FOR ON-LINE SYSTEMS
TECHNIQUES OF DIRECTORY
DECODING
92
TECHNIQUES OF DIRECTORY DECODING 93
"f1
....
t""
CORE LEVEL lAKE/TOO EYER/T IO LEVEL ttl
I I (/l
'"l
'c::"
(')
'"l
c::
ttl
(/l
'"
"f1
2 0
'0"
ZI
t""
....
DISK / /' /' / Z
ttl
(/l
" ><
(/l
'"l
ttl
~
(/l
Table 5
AN EXAMPLE OF UNIQUE NAME TRUNCATION
Uniquely Coded
Uniquely Fragments For
Full Name Coded Fragment Multilevel Tree
BABBET B B
BABSON BABS BABS
BAILEY BAI BAI
BAKER BAK B
BELL BE BE
BELLSON BELLS BELLS
BELMAN BELM BELM
BLACK BL B
BLACKWELL BLACKW BLACKW
CARDER C C
CARTON CART CART
CROZIER CR C
DUNLAP D D
DYSON DY DY
EYERS E E
list length field being null un indicates that the reference is an an-
other track in the Directory and not to the list in the File. The next
three key fragments from the bottom of the list are CROZ, CART,
and CARD; these are entered, in turn, into the next available track,
namely, T 12 , along with their respective link addresses and list lengths.
CROZ, the last fragment on the track, is entered as a reference in the
next record position on the second-level track T 10, with the appro-
priate track reference T 12 and the (J list length. The next three frag-
ments are treated similarly, as shown in the diagram, and this
completes the second-level track, T lO , at which time the last fragment
of TlO is entered into the first-level record, which is stored in core
as EYER/TlO , indicating that the last entry on track T 10 is EYER.
No list length is required because it is assumed that link addresses
from the core level do not lead to File records. The next three records
in reverse order are BAKE, BAIL, and BABS. These are placed in
the third-level track, T 01 , and the last fragment is referenced in track
Too, as BAKE/Tot/(J. At this point there is one remaining fragment,
namely, BABB in the list. Since there are two second-level positions
open in track Too, it is not necessary to begin another third-level track;
therefore, BABB is placed in the second record of track Too with its
appropriate link address A 13 and list length L 13. The last fragment
of the second-level track Too is now entered into the first-level record
96 FILE STRUCTURES FOR ON-LINE SYSTEMS
program does not know beforehand how many fragment fields can be
packed onto a track. Second, in order to minimize the amount of
storage required, key-word truncation is used, as far as is necessary
in order to create a uniquely coded fragment, and this procedure in-
troduces another kind of ambiguity. One set of rules for such an
encoding is illustrated in the second and third columns in Table 5.
As in the fixed word Directory, the key words are first alphabetized
as shown in the lefthand column of the table. Then, the uniquely
coded fragment, as shown in the second column, is obtained by using
the least number of letters, starting from the left, that will be required
to completely distinguish the given full name from the immediately
preceding name.' Hence, BABBET, being the first name in this par-
ticular series, can be uniquely encoded simply by the letter B; BAB-
SON is distinguished from BABBET in the fourth letter; therefore,
BABS is the code fragment required to distinguish BABSON from
BABBET. Likewise, BAILEY is distinguished from BABSON by
the letters BAI, and BAKER is distinguished from BAILEY by BAK.
This procedure is applied to the entire alphabetized index, and the
result is as shown in the second column of Table 5.
In order to illustrate how these variable length coded fragments
are stored as a tree in a disk memory, and how the tree is decoded,
two cases will be presented. First, the case where all 15 names in the
table are to be placed on one track is considered. Then this concept
will be generalized to the multilevel tree assignment.
The single track arrangement is shown in Fig. 29, where the in-
formation is presented in a three-column table. The first column in-
dicates the Record Number on the track. The second column indicates
the Track Content within each field of the indicated record, where a
separate line is used for each information field. The third column
presents Comments relating to the data in the field. The procedure
is as follows: The fragments are rearranged in descending order of
fragment length. Thus, the longest fragment, BLACKW, which con-
tains six letters, appears at the head of the list; then comes a five-letter
fragment, BELLS, and so forth. The first field in a record is called
the header, and contains two pieces of information; one is the frag-
ment length which, in the case of record 1, is 6, and the other is the
number of fragments that are contained in this record which, in this
case, is also 1. Therefore, the decoding program knows that it will
read a fragment code of length 6 with its corresponding link address
and list length, and that there will be only one such triplet in the
100 FILE STRUCTURES FOR ON-LINE SYSTEMS
TRACK
RECORD NO. COMMENT
CONTENT
In this case, the new word assumes the existing coded fragment,
and the old word is assigned a longer fragment such that it is dis-
tinguished from the new word. For example, assume that the name
BLAB is to be assigned to the existing Directory. This would be
decoded to the fragment BL, which has been assigned to the word
BLACK. Since BLAB precedes BLACK alphabetically, the fragment
BL would be assigned to BLAB, and BLACK would be increased to
BLAC in order to distinguish it from BLAB. None of the rest of the
102 FILE STRUCTURES FOR ON-LINE SYSTEMS
In this case, the old word retains the smaller coded fragment, and
the new word is assigned the minimal length fragment necessary to
distinguish it from the old word.
Consider now the construction of a three-level tree for these same
15 key words, as shown in Fig. 30. The construction of the tree
starts at the extreme right. Each logical record within the track is
distinguished by double bars. As in the case of the fixed length key-
word tree, the Directory reads alphabetically from left to right; there-
fore, the construction of the tree from right to left would start in
reverse order. As soon as a lower-level track is filled, a reference
entry is made in the appropriate record of the next higher-level track,
and then a new lower-level track is begun. The variable length key-
word tree requires that a count be made to determine how many key
fragments can actually be put onto a given track less reserve space,
since this number can vary both because the coded fragments them-
selves are of variable length, and because a number of the coded
fragments of the same length can be grouped under the same header.
It is assumed, for convenience, in this example, that each track
holds four fragments. This means that a three-level tree requires only
two-way branching at the first two levels in order to decode 15 frag-
ments at the third level. Each track in the tree must be constructed
according to the single-track principles illustrated in Fig. 29; there-
fore, the fragmentation of the 15 keys, taken four at a time starting at
the bottom of the list is as shown in the third column of Table 5,
where each set of four fragments is uniquely truncated independently
from the others. These fragments appear then in Fig. 30 as the
third-level tracks T 12 , T u , T 02 , and T 01 • The last fragment, alpha-
betically, of each third-level track is entered in alphabetical sequence
into a second-level track; thus, the fragment E from track T 12 is
entered as the last fragment of the second-level track T 10 with an
address reference T 12 • Similarly, the fragment CART of Tn is entered
into track T lO , which completes TlO since the second-level branching
is binary. The last fragment of TlO is E, and is entered into the first-
level (core) record with a track reference T 10 •
L4,I/BELM/TOO 1\ I,I/E/T IO
I \
I ,
~O II "
3,I/BAI/TOI II 4,I/BELM/T021~/~A \
I \ \ >-l
t'!j
I \ TIO ' (')
::c
14,I/CART/TII 111'I/E/TI21~~ z
II \\ \ \ .0
ctTl
\ \ \ til
o'I'j
1.I/B/AI5/L15
\ \ Sl
\ t'!j
\ Til \ \ (')
"
>-l
o
\ 6,I/BLACKW/A5/L5 4,I/CART/A6/L6 1,21C/A7/L7/B/A8/L8 ~
t:I
\ t'!j
T02
\ (')
o
5, II BELLS/A9/L9 2,11 BE/AIl/LIl Sl
zCl
\
TI2 \
2,I/DY/AI/LI II 1,3/E/A2IL2ID/A3/L3/C/A4/L4
.....
Fig. 30. Tree with Variable Length Key Word Unique Truncations
o
c..J
104 FILE STRUCTURES FOR ON-LINE SYSTEMS
/\ o"!l
a el lac or rozier unlap yson
A 52
,a
t!l
(")
~~ ~
k kwell der ton ~
Aley ker 1\ 1\
I Ison man
1i(")l
o
52
~
bet son
resentation of the key term, and to use these as the fixed length key
reference. This procedure can, of course, produce duplicate key ref-
erences, just as truncation in the fixed length key-word tree. In fact,
if in the above example there were more than 1,024 keys in the
system, there would have to be some duplication. That is, the map-
ping would be many to one for some of the keys. The amount of dupli-
cation can be minimized, for a given integer range, if the mapping is
as uniform as possible, in the sense that for a given set of keys the
deviation from the expected number of duplicated references is mini-
mum. A straightforward procedure for accomplishing this is to per-
form one or more arithmetic operations upon all or a part of the
BCD coded representation prior to extraction, which will tend to
remove regularities from the code that occur because of the regu-
larity of certain combinations of letters in natural language, and
because of repetition of certain character sequences due to prefixes,
roots, and suffixes. As an example, the computer words containing
the BCD representation of the key word could each be squared, and
then every fourth bit extracted from the squared words; if this did
not produce a sufficient number of bits, then every fourth bit starting
at the second bit could be extracted, and so forth until n bits had been
°
extracted, where the fixed length key reference were to be within the
range to 2"-1.
Figure 32 illustrates the process of Key Directory Decoding by ran-
domizing. In the upper part of the diagram is shown a series of N
memory locations designated Loc 1, Loc 2, Loc x through Loc y
through to Loc n. This sequence of locations represents the compact
range of the fixed key reference; hence, the next higher integer of
Log2N bits would have to be extracted from the randomized input key
terms. The diagram shows an input key represented as Key X, being,
for example, a natural language key term, which is randomized to
TECHNIQUES OF DIRECTORY DECODING 107
Key Ya, and would appropriately contain a header field of the form
Key Ya/ LY3/'"
If the information structures are not so general as those implied by
the functional requirements of Fig. 12, then the generalized random-
izer of Fig. 32 degenerates to more simplified though specialized
forms. For example, if the records of the file contain only a single
key (i.e., it is a single-key query system, such as the bank example of
Chapter I), and if the records are fixed in length, then the File and
the Directory output merge, since the data records could be stored in
the indirect addresses, and the keys would randomize directly to the
records in the file. That is, if the record were of length W, then its
address would be Wx if its key randomized to x. Chaining would
still have to be provided, however, for redundant key decodings.
Figure 33 presents another modification that can be used with
threaded list structured files, which saves storage by making the in-
direct address level the decoder output, and by utilizing the key field
of the File records as a header. In this diagram the File records are
stored at locations Ax, Ay, and AY2, and a key header, which appears
only in the head of list record, is designated by an asterisk. In general
there will appear keys in the record with and without asterisks. Those
with asterisks represent head of list keys; those without asterisks are
not at the head of the list. The subfields of this combined Directory
header and record key field are: The full key citation/the list length/
the link address to the next record in the file containing the same key /
the chain address (" if no chain)/the randomized code (if the chain
address is not"). The purpose of the randomized code is to identify
the appropriate chain if the complete key citations do not match. That
is, assume that Key Y2 is to be decoded. It randomizes to y, and
thence to Ay via Loc y. An examination of all * key fields will not
reveal a match between Key Y2 and the first subfield; the only way to
then determine the correct chain is to match on y, since the chain is
actually a chain of redundancies on y. The largest storage saving in
this method comes from the common use of the full key citation by
the decoder and the file record.
The advantages of the randomizing technique are that it is rela-
tively easy to program, that it can be fast to decode, particularly if
the size of the key vocabulary equals N, the number of indirect ad-
dress cells, and it is relatively easy to update. Its principal disadvan-
tage is the uncertainty of chain length, since it is usually difficult to
control, particularly if the system is subject to update. In fact some
systems that use randomizing periodically examine the chain lengths,
Key X Key YI Key Y2
t t t
[ Randomize TO; ~
I I I
x, y",- J
Loc x Loc y
>-l
ttl
("l
1:1:
Z
~ttl
til
o'!j
Sl
Of] ::a
ttl
[ Data ("l
Key X >-l
o
~
Ay": Key YI/LYI/AY2"
g
("l
x~ Y",-}
Loc x Loc y ::l
t""
t!:I
CIl
...;
~
("l
...;
c:
lI:l
t!:I
CIl
Ax: Keys [*Key X/Lx/LAx/II ..,
~
[ Data Of] o
ZI
Record ~ f === t""
Z
t!:I
Ay: KeystKey YI/LYI/LAYI/AY2/y .
~...;
t!:I
Of] 1*- . ~
CIl
[ Data
Record
J
AY2: Keys ~ Key Y2/LY2/LAY2/0
[ Data OfJ
Record
Fig. 33. Key Directory Decoding by Randomizing
TECHNIQUES OF DIRECTORY DECODING 111
and if they are too long will attempt to find another randomizing
formula that will better distribute the codes. The result of longer
chain lengths is that the advantage of decoding speed is lost. The
other disadvantage is that randomized decoding is not capable of
automatically performing range searches, such as AGE. BTW. 21-30,
because every possible value that is in the file would have to be
known a priori, and individually decoded.
Table 6
PARAMETERS FOR DECODER MEMORY REQUIREMENTS
Decode...
Symbol Meaning FT VT R
Ct Total Chars.jTrack x x
Cr Reserve Chars.jTrack x x
C, Chars.jKey Fragment (Av.) x x x
C. Chars.jDASD Address x x x
C. Chars.jlist Length x x x
C~ Chars.jHeader x
C. Chars.jKey (Av.) x
a Chain length (Av.) x
m Tree branching factor x x
Nd No. of Different Length Key x
Fragments (Av.)
N. No. of Keys in Vocabulary x x x
N" No. of Tracks Required at Tree x x
Level i
Nt No. of Tracks Required x x X
Md Disk Memory Requirement (Chars.) x x x
Me Core Memory Requirement (Chars.) x X x
m
= INT
-
[C,C,- +CC +NCdC,,]
r -
a 1 •
(2)
Since the bottom level of any tree must contain all keys of the
vocabulary (N X,) except for a remainder that partially fills one track
at the next higher level (See BABB in track Too of Fig. 28), the
number of tracks required at the output of an n-Ievel tree would be
If one considers the values of Nti in formula (4) for m > 10 and
Nk up to 100,000, it may be seen that
N Ii « N In for i = 1 ... n - 1,
and therefore a reasonable approximation for the tree requirement,
of any number of levels, is
""'
Nt ""' N tn = INT_ [NkJ
m . (8)
Level 2
7'~
NmUNJHH,~'1I~I- ~ '\' ~ ...,
t'l1
n
::c
z
Level 3 /iN I 1 1 Nit I I I IN I I I ",UN -+--+ g
"n
-+''3'2'1
2019 18 17 If/( 16'15'14' 13 12 II 10 9 ,. 8 7' 6' 5 4 t'l1
Vl
o"11
m=4 sa
~
t'l1
Nk = 22 n
...,
o
~
N t3 =INT_[~2J=5 ~
Nt2 =INT+[~~]=2 z~
o
Nt 1 = 1NT+[ ~~ ] = 1
Nk = 20,000
m ]00
N
12
= INT 20,000 = 200
- 100
Nt! = INT 20,000 = 2
+ 100 3
= Nk (C + C + 2C + 1)
k 1 a (9)
= Nk (C,[1 - ~J + C + C + 2).
1 a (10)
In formula (9) for Fig. 32, the indirect addressing level requires
Nk/a locations, each with a DASD address. That is, if the key vo-
cabulary, N k , were 20,000, and 10 bits were extracted from the key
by the randomizer, this would produce 1,024 codes, and the average
number of redundant decodings (i.e. the average chain length, a)
would be 20,000/1,024~ 20. Therefore, the total number of char-
acters required for the indirect addressing level is NkC a / a. The out-
put of the decoder requires, for each of the N k keys, the full citation
C k , the list length, Cl, a chain address, Ca, if there is a chain, and the
decoder output reference address Ca. One could economize by adding
a character to the output record that would indicate whether a chain
address were present or not. Thus, one character is added to the
count, and the chain address Ca is assumed to be required only a-I
out of a of its occurrences. When the factors are multiplied and
collected, formula (9) results which, curiously, is independent of a.
It is left for the reader to determine why this happens.
TECHNIQUES OF DIRECTORY DECODING 117
1.1. The reason for desiring low a is fast decoding, as will be seen
in the discussion of access times, and since M d is independent of a
nothing is lost in memory, unless the indirect level is stored in core,
in which case, if memory space is to be optimized, a larger a is more
desirable.
o"r]
Tree with Variable 1 56 8 21 21 0 21
Length Key Words 4 10 150 536 8 201 201 0 201 S2
30 1600 16 600 606 0 600 ttl
--- "n
-,j
I 108 12 27 27 0 27 o
8 10 122 984 12 246 246 0 246
30 2952 36 738 744 0 738 "-<ti
ttl
Randomizer (Fig. 32)
n
1 4.4 (1] 11.4 ['] 15.8
2 12 10 44.0 114.0 158.0 ~
30 1320 342.0 474.0 Z
Cl
---
Randomizer (Fig. 33) 1 3.4 (2] 1.6 ['] 5.0
2 10 34 16.0 50.0
30 102 48.0 150.0
- ----- -------
C, = 3000 C(I = 4 Ci = 1.1 [3] Either excess retrievals or full key citation
C,· 300 C. = 2 (1] Formula (9b) ['] Formula (9c) 1.0
--
C, = 2 Nd = 4 [2] Formula (lOb) [5] Formula (lOc)
120 FILE STRUCTURES FOR ON-LINE SYSTEMS
tween the two- and three-level trees, and this presents a time/space
trade-off. The two-level tree decodes in one random accession but
requires greater core storage, while the three-level tree decodes in two
random accessions and requires minimal core storage. Of course, the
absolute values are probably more important in this case than the
relative values; for the case Nk = 1,000, the choice would clearly be
a two-level tree, since the difference between 32 and 8 characters is
insignificant. On the other hand, the 896, 1,884, 1,600 or 2,952
characters of core required by-the 30,000 key vocabulary may be a
significant allocation, particularly if it must always reside in core.
Third, the resolution of ambiguity in the fixed tree is very expen-
sive. Consequently, these decoders normally resolve ambiguity by
sacrificing accessions; however, the total memory requirement includ-
ing resolution overhead, is not too much more than that for the vari-
able tree, and since the former is considerably easier to program, if
the designer elected to accept the additional allocation rather than
the excess retrievals, the fixed tree, in this analysis, would still be
superior to the variable tree, because of programming simplicity.
Fourth, the randomizer of Fig. 33 is clearly superior by a factor
of 3 to the Fig. 32 randomizer, and there the trade-off consideration
is flexibility. The randomizer of Fig. 33 is specifically tailored to a
threaded list or Multilist file organization, while the other is com-
pletely general.
Fifth, there are two kinds of comparisons to be made between the
trees and the randomizers. If one accepts the excess retrievals of the
fixed tree in order to resolve ambiguity, then the total disk storage
requirement for the tree is given under M" in the table, and for the
randomizers under Total (last column) since the randomizer has
the resolution built-in. In this case there is little difference between the
tree and randomizer of Fig. 32, but a significant difference between
the tree and randomizer of Fig. 33. On the other hand, if the resolu-
tion of the fixed tree output were by citation of the full key, then there
would be somewhat of a difference between the tree and the Fig. 32
randomizer, and a very significant difference between the tree and
Fig. 33 randomizer.
In summary, the various quantitative trade-offs in selection of a
Directory Decoder involve decoding speed. core and DASD memory
requirement, and programming complexity, while the qualitative
factors are range search capability and the contingency on threaded
list file organization.
122 FILE STRUCTURES FOR ON-LINE SYSTEMS
6. Decoding SPeed
1\ = p + ~.5 R, (11 )
where P is the average head positioning time, and R is the disk revolu-
tion time. This formulation can be generalized for an n-Ievel tree
with first level in core to
Tn = P + 1.5 R + 2 (11 - 2) R
=P + (2n - 2.5) R. for 11 > I. (12)
This assumes that no further head positioning is required after the
Table 8
COMPARISON AND TRADE-OFFS AMONG THE
DIRECTORY DECODERS ANALYZED IN TABLE 7
Table 9
DECODING TIME FOR THREE-LEVEL TREE
Table 10
DECODING TIME FOR THE RANDOMIZER (Fig. 32)
Table 11
DECODING TIME FOR THE RANDOMIZER (Fig. 33)
126
TECHNIQUES OF SEARCH FILE ORGANIZATION 127
List Structured
'"
0
ZI
File in Random t""
.....
Z
Access Memory ttl
{/}
Cell 2 0<
{/}
o-j
ttl
~
{/}
Cell 3
w X Y Z
A6 AI9 A3 AI9 A9 AI5 A27
A7
A9
A23
A35
A7
AI4
A20 AI4
AI6
AI7
A22
A37 ---
AI2 AI5 A21 A25
.A 3
CeliO • A7
.A9
~----------- ----- -----
.A12
Celli
- - - - - - -A21- -A16·
- - -.A17
- - - - -• -AI9- --
A20.
•
Cel12 • A22 A23.
1"-----------------------
Cel13
Since the resulting addresses from the logical search of the inverted
lists is precisely the retrievals specified by the key logic part of intra-
record processing, the ratio of system retrievals to DASD accessions
is higher than for the Multilist organization, and if no qualifier logic
is involved then the ratio is unity. Therefore, the Inverted List system
has a considerably higher quality presearch statistic than the Multilist
or any of the other partially inverted systems to be described. In
Fig. 36, the WY query intersects at A9 in the inverted lists; therefore,
the presearch statistic, which can be returned to the user prior to
accessing the record from the file, is one, and the number of random
accessions from the file is one.
An efficient way to program the Inverted List logic processing, for
systems in which the list lengths may vary greatly, is illustrated in
Fig. 40. Assume that the variable length key lists A, B, and C are
to be logically processed. These are the inverted lists stored in the
DASD, which contain the sequenced addresses of all file records that
contain the keys A, B, and C, respectively. Each list may be regarded
as a logical record that extends, in general, over a series of physical
records.
Six buffers are allocated in the central processor, two input pairs
(11,12, and 13, 14) and one output pair (01,02). The solid line
rectangle in Fig. 40 designates the processor; all switches are imple-
mented by programming in the processor, and the broken lines rep-
resent disk to core or core to disk data transmission. The physical
records from two input files are double buffered into the input buffers,
and processed alternately by the Logic Processing, after which the
resultant addresses are double buffered out to one of two output files
(FI, F2) on disk. The sequencing for the processing of the query
expression f(A,B,C) is shown in triangles on the figure. First, input
buffers 11 and 12 are loaded with two records from list A and 13 and
14 from B ("V). As 12 and [4 are loading, 11 and 13 are processed,
and the results transmitted to the output buffer 01 and, if necessary
02. For example, if A and B are intersected, then only 01 is required
for 11 and 13, but if A and B are merged, then 02 might also be re-
quired. The program successively reads records from lists A and B,
and writes from output buffers 01 and 02 onto DASD file Fl (W).
When A and/or B are completely processed, file Fl is switched and
becomes an input to buffers 11, 12 (&), list C becomes the other
input to 13, 14, (~), and the output buffers 01, 02 are switched to
DASD file F2 ('fI). This procedure can now be repeated for as
many keys as desired and of any arbitrary length. The principal ad-
132 FILE STRUCTURES FOR ON-LINE SYSTEMS
vantage of the Inverted List over the Multilist organization is that the
list intersection or merge process is considerably more efficient, since
it is performed on compact, sequenced lists rather than requiring a
random accession for each record on the list. Thus, the exact number
of addresses that respond to the entire Boolean expression of keys
is transmitted from the Directory to the File, although each record
must be randomly accessed in order to examine the qualifier condi-
tions. Furthermore, the number of addresses that is produced by the
Inverted List processing is a more accurate retrieval statistic that can
be returned to the remote terminal prior to the actual search in the
file, since the user may want to make a query modification based upon
the size of this number. Disadvantages of the Inverted List system are
that a working or staging area is required in order to perform the
logic processing (intersection, merge, deletion), and the list records
being variable length should include some reserve if real-time update
is to be allowed.
'"%l
....
t""'
t!j
en
..,
CeliO
~
(")
..,
c:::
~
t!j
en
'"%l
Cell I o
~
~ I
t""'
Ii:t!j
Cel12
~
t!j
~
en
-----~---------
Cell 3
Moximum List Length= 4
Fig. 37. The Multilist File Organization with Controlled List Lengths
TECHNIQUES OF SEARCH FILE ORGANIZATION 135
4. Cellular Partitions
The preceding three list structures have the common property that
no attempt is made to arrange or order the records in the File for
more optimal retrieval. The File may be ordered by record accession
TECHNIQUES OF SEARCH FILE ORGANIZATION 137
number, but these number assignments are quite arbitrary with respect
to the file structure and retrieval mechanisms. Furthermore, those
controls that are applied, such as the controlled list length Multilist,
do not lead to predetermined file processing efficiencies, but rather
are more incidental, being a function of how the records happen to
group or distribute themselves over the various lists, and of how the
various keys happen to combine in queries.
An alternative is to define logical cellular boundaries throughout
the DASD medium into which the records may be placed according
to some predetermined storage strategy. Or, even if the records were
still loaded arbitrarily, the cells represent a partition that may be used
in lieu of or in conjunction with list structured controls. This type of
file partitioning, referred to as Cellular Partitions in Fig. 27, will now
be explored.
Figure 38 illustrates a Cellular partition that incorporates a Multi-
list file structure. Looking the other way around, it could be viewed
as a modification of the Multilist technique, wherein each list is local-
ized within a cell, instead of being limited by length. This technique
is, therefore, called Cellular Multilist. The same approach could be
applied to the Inverted List method, wherein, the inverted lists for a
given cell would appear at the beginning of the cell.
Since the cell is part of the record address, as shown in Fig. 38,
the inverted listing of heads of lists at the Directory output is also a
listing of the cells in which a search must take place, and this cell
Inverted List can be used to advantage in order to reduce the number
of record accessions from the DASD and, as a result, to improve the
presearch statistics.
Consider the query XZ. An examination of the output level of the
directory shows that list X contains sublists that are wholly contained
within Cells 0, 1, and 2 with list lengths, respectively, of 2, 3, and 1.
Similarly, list Z has sublists that are entirely contained within Cells
1, 2, and 3, and list lengths 2, 3, 1; therefore, one cannot expect to
find a conjunction of X and Z in any cells that are not contained within
the cell intersection between the head of list addresses of X and Z.
That is, list X contains a head of list address in Cell 0 but list Z does
not; therefore, no intersection of XZ exists in Cell 0 because list Z
does not appear in Cell O. Similar reasoning applies to Cell 3. There-
fore, the search on the conjunction XZ would be limited to those sub-
lists of X and/or Z contained only in Cells 1 and 2; furthermore, in
Cell 1, list Z is preferred because it has a list length of 2 versus 3 for
list X in Cell 1, and in Cell 2 list X is preferred with a list length of 1.
138 FILE STRUCTURES FOR ON-LINE SYSTEMS
W X y Z
AO.6 13 A 0.312 A 0.9/1 AI.7/2
A 1.2 12 A 1.413 A 1.4/2 A2.2 I 3
A2.3 I I A 2.0/1 A 2.11 I A3.71 I
A3.5 I I
Cell 0
,
I
------T---
I
,_LI _____ _\
A 0.9
',..J. A 1.2
' .... _ A 1.4 1 I
Celli
- AI.T
_ _ _ _ _ _ _ _ ...L_+ _ _ _ _ ....-...:_
/ I , ....
A2.1~ / A 2 2 , A2D
Cel12 . A2.3'
\
\
-------~----------~
Cell 3 I"
4A3.7
~
A~
Table 12
QUERY /CELL ACCESSION LIST
Q1 0, 1, 4, 9
Q2 1, 8, 9, 15
Q3 0, 2, 4
140 FILE STRUCTURES FOR ON-LINE SYSTEMS
Table 13
MERGED CELL ACCESSION LIST
0 Ql. Q3
1 Ql. Q2
2 Q3
4 Ql. Q3
8 Q2
9 Ql. Q2
15 Q2
time for head motion. The system could also be constructed so that
higher priority queries would override this schedule and force the
heads to jump to those cylinders wherein high priority requests re-
quire service. If a new query were to be submitted to the system in
the course of the head traversal, then the executive would immediately
merge the new cell accession list into the current list so that the new
query would in turn go into execution immediately. When the head
reaches the highest cylinder number, the process would be reversed,
and the head would travel down the list on its return trip in order to
service those calls of queries that were entered in the wake of its prior
traversal.
This technique can also be applied to increase the effective batch
size in magnetic tape searches. Let cells be defined as tape segments
so that the merged cell accession list indicates which queries are to be
processed during the passage through the processor of the indicated
segment. Furthermore, the queries themselves can be sequenced on
another tape according to this same schedule. For example, Table 13
would generate a query tape of the form: (Cell 0), Ql, Q3; (Cell 1)
Ql, Q2; (Cell 2) Q3; (Cell 4) Ql, Q3, etc., where each query is
completely repeated on the tape. Then, as the file tape segments pass
through the processor, the query tape is moved, and only those queries
required for processing will actually be in core. If the file is also list
structured, then each record that passes through the processor will
be examined by the relevant query only if it is on the appropriate list.
A sequenced list of "next address" must be maintained by the search
executive in order to generate the record-to-query pointers, but the
benefits in search economy can be considerable. The limitations of
batch systems are (1) the number of queries that can be placed in
core, and (2) the time to process all queries in core against a single
record. As the number of queries increases, this time increases, and
the system passes from tape to processor limited operation. Using
TECHNIQUES OF SEARCH FILE ORGAN1ZATION 141
I I I
I • I· I •
I • I I
I •
I I
•
•
• I
I
N-NIf)
•
• • I
I
•
• •
•• I
• I
>-O-N
• •• • I
•
•• I
•
• I
•
><O-N • • I
I
•
•
rL L
• • •
I
•
I
•
I
I
~O-NIf)
• I
•
• I I
t 4
I
- o N
o • •
o •
o •
o
TECHNIQUES OF SEARCH FILE ORGANIZATION 143
appear on the same track. Unfortunately the magnetic strip and mag-
netic card DASDs like the IBM Data Cell have the larger access
times of several hundred milliseconds, but also have a relatively low
serial data transmission rate of around 50-70 KB/S; however, in time
it can be expected that serial transmission rates of devices in this
category will increase.
s. Aut01llatic Classificati01l
In such systems, the updates are made in batches, and even in on-line
update systems, there is usually a massive file generation and update
capability that is performed off-line as an economic expedient. It is
also of interest to note that such a procedure can most effec-
tively be carried out without requiring the random access mode
of the DASD, since it consists chiefly of sorts. The process starts
with the input of a linear magnetic tape file of records, each with
the keys separately identified and somehow distinguished from
the rest of the data in the record. In fact, for the purpose of the
following discussion, the record has three distinguished parts: an
accession number, the keys, and all remaining non-key data, in-
cluding the qualifiers. The list structured file can then be generated
by a series of sorts, as shown in Fig. 41. At the upper left of the
diagram appears the Input File, which contains records in a format
similar to that shown in Fig. 18, with the three distinguished parts.
The Link Address, which appears with each Key Name/Value pair
in Fig. 18, is the only record component that is not contained in this
input file, and it is one of the functions of this program to assign them.
Below each tape symbol in Fig. 41 are contained the relevant data
fields in each record. An underlined field designates the sort key of
the file. As shown, the input file is assumed to be in accession number
(AN) sequence, which could be regarded as the main file key in the
system. Alternatively, the system could be sequenced on any other
desired unique key. In Block 1 Disk Addresses are assigned to each
input record in turn, allowing space for the Link Address. The input
records are 'packed on the tracks, and a certain amount of reserve
space should be left at the end of each track if the file is to be subject
to real-time update. This allows for expansion of records in real-time
without having to relocate and readdress data records, since the
address of any given logical record is its physical track address plus
a sequence number indicating the position of the logical record on
the track. The length of each record may be indicated by a character
count contained within the table of contents, so that the required
record on a track is readily accessed by a series of indexing operations.
It is customary to leave approximately 10% reserve area at the end
of the track. Furthermore, another loading rule that is used in the
Multilist system is to avoid splitting a record between two tracks unless
it is the case that a single record requires more than one track of
storage. Therefore, if a record is shorter than one track but cannot
fit completely within a track, it is begun on a new track. The logical
record address, consisting of the module number, physical track num-
TECHNIQUES OF SEARCH FILE ORGANIZATION 145
A B C I Decoder
~1~------I~------c-I"""'---' Output
: : :' fl
r---~---'
W
~W
~----T----
;
0/
II I4
01 02
. ----0----.. .
I W
~ IF;I
L.~-<&.J
L___________ ..J
...,
ttl
2 3 (")
::z:
Assign z
Generate Sort by .0
Disk c:
ttl
Key/AD Key/AD VJ
~Addre Pairs o'"%j
( AI
AN AD Key/AD Key/AD VJ
ttl
Keys Keys >
~
(")
Non Key Data ::z:
'"%j
4 t=
ttl
o
Construct Key A ~
Inverted Last >
AD z
Key Directory AD
•• ~
(5
Key B z
AD
AD
.....
~
Fig. 42. Inverted List File Construction 1.0
150 FILE STRUCTURES FOR ON-LINE SYSTEMS
complete key. If this key in turn did not match, then it would chain
to another list, and so forth. If the Directory contained unique keys
(i.e., one of the variable trees) then the citation of the key and the
chain address would be unnecessary in the variable length inverted
list. Since the list is variable in length, it may also be desirable to
store the list length. This information may also be useful to the
logical expression decoder, since, if a conjunction of an extremely
long list and an extremely short list is required the decoder may
not even perform the list intersection, but rather will search the short
list directly. At the end of the list of addresses a reserve space should
be left so that if records must be added to a given list, the appropriate
address can be inserted in sequence without overflow. If the reserved
area should become exhausted, as shown for Key Y, then the last
location of the record contains a link address to another variable
length record where the list continues. When the file is reconstructed,
the key lists are once again pulled together into single variable length
records.
The procedure for processing these Inverted Lists according to
query logic has already been described, where, in Fig. 40, the lists,
A., B, and C correspond to the Inverted Lists of Fig. 43.
• AD ttl
>
:=
AD n
• AD Variable :=
• Length "%j
AI8 ...
t""
Inverted ttl
Lists 0
~
AI8 I AD ~
N
AD >
...
• S
• z
•
--
152 FILE STRUCTURES FOR ON-LINE SYSTEMS
Table 14
SYMBOL DEFINITIONS FOR FILE PROCESSING CALCULATIONS
Parameter
Symbol Definition Type
Table 15
LIST SEARCH RETRIEVAL TIME
List (Cell)
intersection
- [ ~] NdTd 1.5 R) [~J Np(Td 1.5R)
List (Cell)
Search and L, (T, + 1.5 R) nL. (T, + 1.5 R) ",C, (Td Rc;,')
Record Transfer
The actual record access time for a record is the time to position
the head of a movable head DASD (Tr) plus latency (~R) plus the
track read (R), assuming that a physical record is one track.
If the physical record were of any other length, R would be in-
terpreted as the record read time and modified appropriately. For a
fixed head DASD, Tr = O. The Multilist decodes, say, in an n-Ievel
tree, all nonnegated keys in the query product; the Inverted List de-
codes all terms, and the Cellular Serial also decodes only the non-
negated terms. There are no list intersections prior to the File search
(5)
This inequation says that the more lists to be intersected (Nt), the
more physical records per average list ([ ~]>, and the smaller the
shortest list (L.), the more likely it is that the Multilist retrieval time
will be less than the Inverted List time. However, in general, inequa-
tion (5) is satisfied, because p is usually very small for Nt in excess
of 2. For example, for Nt = 3, A = 500, L = 200 and L. = 20; the
right side of (5) is .85. This means that the density of hits on the
shortest list for a 3-term conjunction would have to exceed 85 % be-
fore the benefit of performing the list intersections in the Inverted Lists
would be overcome by simply searching the shortest list. One might
expect p, for 3 terms to be on the order of 0.1 to 0.25.
Again, the reader is cautioned in the interpretation and use of these
formulations. In some systems two (or more) DASD types may be
used. For example, a Disk Pack might be used for Directory storage
while a Data Cell is used for File and perhaps Inverted List storage,
in which case the DASD oriented parameters must be appropriately
assigned their respective values in the formulations.
CHAPTER VIII
155
156 FILE STRUCTURES FOR ON-LINE SYSTEMS
(1)
where C'r and C',. are the fixed hardware and software assessments
apportioned to the time period over which the batch of N transmis-
sions has accumulated, and it is obviously these assessments that are
the most circumspect.
The remainder of this chapter is concerned with the techniques of
file structuring for real-time update, given that the system designers
have decided that it is required. On-line updates can be put into five
categories:
this time are the link addresses. After the record has been edited for
file entry, a DASD address AD, is assigned to it in accordance with
available space on the DASD. In any system using a movable head
DASD, new records should be assigned addresses in a monotonic
sequence, so that the mechanism moves in smaller increments, in one
direction as it accesses a list. The third step begins a loop in which
each key within the record must in turn be processed. The ith Key
in the record is decoded in the Directory. Then, in step four, the head
of list address of Key i currently in the Directory is transferred from
the Directory to the link address field of Key i in the new record. In
step five the address of the new record, AD, becomes the new head
of list address of Key i in the Directory. This effectively puts the new
record at the head of the list and maintains the remainder of the list
without having to access or affect any of the other list records. In
step six the list length of Key i in the Directory is incremented by 1,
and in step seven the loop is closed by repeating steps three through
six for all keys in the new record. Finally, in step eight the new
record is stored in the DASD at address AD.
Figure 45 schematically illustrates this process for a single key.
in the upper half of the figure is shown th-e Before Update picture,
and in the lower half of the figure is shown the After Update picture.
Table 16
WHOLE RECORD ADDITION
I 105 ---_._---
(
Ie fore
0
Update zI
t"'
Z
t!\
'!1
r::t!\
® c:::
Output Level ."
of IKe y X/182/31 ~
>-l
t!\
Key Directory I
>
I Z
0
~
>
....
After z>-l
Update t!\
Z
>
I
z
(')
i \ t!\
t
Addresses
Increasing
/ ....
VI
Fig. 45. Key Update \0
160 FILE STRUCTURES FOR ON-LINE SYSTEMS
At the top of each section, is shown the Output Level of the Key
Directory. For simplicity a single key update is illustrated, i.e., a
single iteration through the loop of steps three through six in Table 16.
As indicated in step seven, this procedure would have to be repeated
for every key in the new record. Consider, therefore, the Key X,
which has two items on its list, the first of which appears at address
105 in the file area. Addresses are assumed to increase in this dia-
gram in an upward direction. That is, when this file was created, the
first item entered was that at address 76, and the second entered was
at address 105. At this point in time, it is desired to add a third item
to the list. As indicated by step four, the head of list address in the
output level of the Directory, being 105, becomes the link address of
the new record, and, as indicated in step five, the address of the new
record, which is to be 182, becomes the new head of list address in the
Directory. Finally, as indicated in step six, the list length is incre-
mented by 1. The complete picture after update is shown in the lower
half of the diagram.
Figure 46 presents both the procedure and a schematic for Whole
Record Deletion. An entire record is deleted from the file in real-
time by a one- or two-step process. First, the record is accessed, and
the record delete bit is set to t. This step alone can complete the
update, since the record has been logically removed from the file and
all lists that pass through this record remain intact. The only other
update that may be desired, depending upon point of view, is the
list .length. If the designer regards this number as the physical list
length, i.e., the actual number of random accessions required to
traverse the list, then it should not be modified and the update is fin-
ished with step 1. If it is regarded as the logical length of the
list, i.e., the number of retrievable records that can respond to a
query, then the list length of every key in the record must be decreased
by 1. The former definition is more appropriate to use of the list
length for determining which list in a query logical product to search,
while the latter is more appropriate as a presearch retrieval statistic.
The system should also be so constructed as to maintain statistics on
the number of such delete bits that have been set, and periodically, in
accordance with these counts, the entire file should be regenerated
in order to repack the file and remove these records completely from
the system.
Figure 47 illustrates the deletion of individual keys within a record.
It also is a one- or two-step process. First, the record is located and
brought into the core. The key delete bit of all keys in the record
ON-LINE FILE UPDATE AND MAINTENANCE 161
that are to be removed is set to 1. The figure shows a list that formerly
contained four records under Key X. The third one has been deleted
by the placement of a 1 in its key delete bit. The search system when
searching this list would access each record in tum, but having the
third record in core, would detect the key delete bit, ignore the record,
and immediately access and process the fourth record. The list length
decrement is again optional, depending on its use as an indicator of
physical or logical list length.
Directory
~~------------------------------~
Directory
~--~~------~------------------------~
Table 17
ADDITION/D£LETlON/MODIFICATlON OF
NON-KEY DATA
(A) repacked track does not overflow, then write onto DASD
(B) repacked track overf!o_. then delete whole record and add
modified record accordin. to whole record addition
ON-LINE FILE UPDATE AND MAINTENANCE 163
~
Track X II R2 II 0 IR3(Modified) II R4 1[/11 [After] ~n
-I
c::
1:l
CIl
"II
Case (B) ~
~
Track x---i RI II R2 II 0 I R3 II R4 IVI/////1 [BeforeJ
z~
t!j
Track X
~
t!j
~
After
Track Y
Table 18
ADDITION OF KEYS
1. Read record from DASD address AD into core. an:! add keyes)
Table 20
WHOLE RECORD DELETION (INVERTED LIST)
METHOD ONE
METHOD TWO
should be accessed and the key citation within the record should be
deleted. It should be noted that the key delete bit is not required in
the Inverted List system because linkages do not exist in the file area
itself and hence deletion of an entire key from a record does not de-
stroy the continuity of the list. In fact the record address is physically
deleted from the inverted key listing in step two. In those systems in
which the keys are not cited in the file record itself, there is no
requirement to perform step four.
The updating of non-key data in the Inverted List system is identical
to that in the Multilist system since there are no key listings involved,
and the essential difference between the Multilist system and the
Inverted List system is related only to the organization of key lists.
Table 22 outlines the procedure for the Addition of Keys to an
Inverted List system. It is very similar to the process of adding a
new record since, in order to add a new record, key lists must be
updated. The only difference is that the new keys must also be added
to the record in the file area, if keys are cited in records, and the
record must then be restored to the file area, again in accordance with
the non-key data modification procedure, because the addition of the
new keys may enlarge the record to the extent that it could not be
reinserted on its appropriate track.
168 FILE STRUCTURES FOR ON-LINE SYSTEMS
Table 21
DELETION OF KEYS (INVERTED LIST)
4. If keys are also cited in the file record, access the record, and
delete the key citations
Table 22
ADDITION OF KEYS (INVERTED LIST)
5. Read record from DASD address AD into core and add new keys
to record
Since the Directory to File pointers designate cells (or at most in-
ternally list structured cells) in the cellular partitioned systems, only
the transfer of a record out of or into a cell requires a Directory up-
date. Also, in the special case where a new key is added to a cell
or a key occurrence is retired from a cell, it is necessary to update the
Directory. The Directory update can therefore be minimized by leav-
ing sufficient reserve space at the end, or distributing it through the
cell, so that the greatest majority of record relocations or trailers due
to expansion are within the cell.
Before
Maintenance
After
Maintenance
5. Update Timing
Tables 23, 24, and 25 present timing formulations for the Multilist,
Inverted List, and Cellular Serial systems with respect to the five on-
line update categories-whole record addition, whole record deletion,
deletion of n keys, non-key modification (with and without record
relocation), and addition of n keys. It is assumed that the list lengths
are physical lists, and therefore do not require decrements in the Di-
rectory output when the key or record delete bit is set, and that the
number of keys in a record is N k • It should also be noted, as shown
in the footnote of Table 23, that a complete revolution, R, must be
added to random access writes in which the DASD does not include
hardware vertification with an immediate read after write. Appendix
C indicates for each of the equipments described which ones have this
hardware facility. Those that do not, like the IBM 2311 Disk Pack,
should be verified by a programmed read (on the next rotation) of
the written data.
In each of these tables, the update procedure is broken into four
successive steps:
1) Decode Directory.
2) Access Record (to be updated).
Non-key Non-key Addition of
Whole Whole [I] Deletion ["I Modification Modiflclltion n Keys
Record Record of (without (with (without
Table 23
Process Alldition Deletion n Keys Relocation) Relocation) Relocation)
UPDATE TIMING
Decode Directory T. ['II 1. T. T. T.
FOR MULTILIST
Access Record TA TA TA TA TA
FILE STRUCTURE
Update Directory N.T" N.T. nT.
Store Updated Record T. PI T .• T. T. T. TA
3) Update Directory.
4) Store Updated Record.
This assumes that all updates are against a single record which is pre-
sumably identified by its accession number. In the case of generic
updates, appropriate multipliers are required to account for mUltiple
key decodes in step one and multiple record accessions, directory up-
dates, and record restores, in steps two, three, and four. A ranking
of processing complexity is revealed by these tables and summarized
in Table 26. The Cellular Serial is least complex, assuming that rec-
ord relocations are made within a cell, and that the deletion or addi-
tion of keys to a record does not completely remove from or require
the addition of keys to the cell, which will be the case in the majority
of updates. Intermediate in complexity is the Multilist structure, and
most complex is the Inverted List structure, because of the require-
ment to update the inverted lists.
It may also be seen from Table 26 that the following relation-
ships exist for the five categories between the Inverted List and Multi-
list update times.
Table 26
UPDATE COMPARISONS AMONG THE THREE FILE STRUCTURES
Cellular
Update Type Multilist Inverted List Serial
An example.
Table 27
FILE. DASD. AND QUERY
PARAMETER ASSIGNMENTS
Parameter Value
V 10.000
NT 500,000
N~ 20
L 1,000
C, (fast) 3,600
Ct (slow) 2,000
R. 100
C. 100
N. 4
N, 3
L. 150
P 0.1
a 0.1
A (fast) 900
A (slow) 500
Tr (fast) 85 msec.
Tr(slow) 500 msec.
R.(slow) 50 KB/S
R (fast) 25 msec.
R (slow) 50 msec.
176 FILE STRUCTURES FOR ON-LINE SYSTEMS
For example, the values of p and a are very critical with regard to the
comparisons of Inverted List and Cellular Serial. It is possible, how-
ever, to confirm certain intuitive statements made previously. On
retrieval, the Inverted List approach is considerably faster than Multi-
list, and this is invariably the case. The Cellular Serial is faster than
Inverted List if a is approximately the same as p. Furthermore, the
highest quality presearch statistic is obtained from the Inverted List
system, and it is obtained after (N,Ta + [~ ] Nt[Tr + 1.5R])
milliseconds, which in this example is 5.3 seconds. This can be de-
rived from the first two rows of Table 15, in the Inverted List column.
The Inverted List structure is almost invariably slower on update
than the Muitilist, and the Cellular Serial, under the assumption that
relocation is always within the cell, is either equivalent to or slightly
faster than the Multilist system. In fact, relocation is a relatively time-
consuming process in the Inverted List system.
Table 28
DASD ASSIGNMENTS TO FILE COMPONENTS
Table 29
TIMING CALCULATIONS FOR ON·LlNE FILE UPDATE COMPARISONS
• All transactions include decoding with a three·level tree. the top level stored in core
(Formula [11] Chapter VI).
ON-LINE FILE UPDATE AND MAINTENANCE 177
The formulations and Table for computing File storage and process
timing presented in Chapters VI through VIII are indicative of the
difficulty in making general assessments of superiority of one file
structure over another. One must consider all of the various qualita-
tive and quantitative factors including ambiguous vs. unambiguous de-
coding, ambiguity resolution overhead in DASD memory space, range
search capability in decoders, decoder speed, decoder memory require-
ment, file retrieval speed, terminal environment (typewriter, printer,
CRT), requirement for interrecord processing, type of DASD, assign-
ment of file components (Directory, Inverted Lists; Data File) to
DASD types, query characteristics, real-time vs. batched update re-
quirement, update vs. retrieval transaction volume, and programming
complexity. Table 30 contains a summary of the most pertinent file
related properties, and the relative merits of the various Multilist file
organizations, the Inverted List organization, and the Cellular Serial
organization. Again, lower numbers in the chart indicate the more
optimal property value or attribute.
In teletype terminal systems the speed of initial response may be
a more important factor than either successive responses or total
response time, since the successive retrieval time is usually less, in
any of the systems than typing time. However, if there is interrecord
processing the total response time is more significant. In the Multilist
and Cellular systems this time is quite unpredictable, because the first
list intersection for a key conjunction may appear anywhere on the
shortest list, although the controlled list length and cellular variants
increase the possibility for a fast response. The Inverted List struc-
ture, on the other hand, has an initial response time that is directly
a function of the length and number of lists to be logically processed,
but if the presearch statistic is not required, the executive system could
be so constructed as to begin accessing File records as soon as the
logic processing produces its first retrieval address, and can subse-
quently overlap the File accessions with list processing. This will
assure a much faster initial response for the Inverted List system. In
a CRT system, the successive response time becomes more critical
when the viewer wants to quickly scan the responses, and hence the
Inverted List approach is clearly superior since it is invariably fastest
in this respect, being a function only of the DASD mean access time.
In a system with an on-line, high speed line printer, successive and
total retrieval time is of paramount importance.
Table 30
SUMMARY OF FILE ORGANIZATION PROPERTIES
-..I
00
Controlled LISt Cellular
-
MultlllSt Multma Multlillt Inverted Wst Cellular Serial
Speed of Initial First list First list Number of Query list Query (cell)
Response I. a function of: intersection intersection cells and len~h. list len~hs.
and dlstrlbu· first list size of cell. and ::l
t""
tlon over cells intersection first intersection
"'
~
Succe••lve Retrieval Time 4 2 2 1 3
- With Keys in the Inverted List File record/Without Keys in the Inverted List File record.
ON-LINE FILE UPDATE AND MAINTENANCE 179
The Cellular Serial system requires the fewest DASD random ac-
cessions in the File, but it manages this at the expense of large scale
serial transmissions. In terms of pure list structures, the Inverted List
is again superior to the Multilist systems, although the latter can be
somewhat improved in this respect by Cellular partitions.
The Cellular Serial system cannot provide very meaningful pre-
search statistics except possibly by actually sampling the Gells and
computing the expected response population by statistical inference.
This approach is quite feasible, easily programmed, and can be fairly
accurate. Furthermore, the responses in the sample can be displayed,
and if the user so indicates, a larger sample taken, providing increas-
ingly more reliable estimates and further retrievals. The Inverted List,
of course, provides the most accurate presearch statistics, followed by
the Cellular Multilist, which provides the sum of the shortest lists in
each of the responding cells, followed, finally, by the Multilist, which
provides the shortest list.
Programming complexity is highly subjective, because it is some-
what a function of the experience of and past methodologies employed
by the programmers and analysts. However, the Cellular Serial and
Multilist systems have "fewer moving parts" than the Inverted and
partially Inverted List systems, and therefore have a potential of
lesser complexity.
A major advantage of the Multilist System, in addition to inherent
simplicity, is its update speed; however, it gains this speed at the
expense of file disorder, and the space maintenance problem must be
solved in the background mode either by the list of available space
technique or bidirectional link space brooming. Otherwise, space
maintenance must be scheduled and performed as file regeneration.
Finally, a comparison of File memory requirement depends upon
whether or not the keys are stored in the record. This option is open
only to the Inverted List system since, if the keys are used only for
intrarecord logic processing and not for interrecord processing or
printing, then they can be omitted from the Inverted List File record.
In this case the Inverted List structure has the least memory require-
ment, because it has no repeated key citations, (i.e., it is cited only
once, in the Inverted List at the Directory output). The next most
economical is the Cellular Serial structure because it has repeated
keys in the records, but no link addresses other than in the inverted list
of cells, which is a considerably smaller body of data than the set of
link addresses. Next comes the full set of key citations and link
addresses found in the Inverted List (with record keys) and Multilist
180 FILE STRUCTURES FOR ON-LINE SYSTEMS
7. CtmclusUms
ANY SYSTEM HAS its genesis with a need, and, therefore, once a need is
indicated a determination of requirements may be made. This is usually,
at the outset, a rather informal affair, wherein a few people get together
and agree that in fact some need for a system exists. Figure A 1 presents
a block diagram of the steps that are normally followed (with variations
that would depend on the size and structure of the organization), in pursu-
ing such an inclination. The informal expression is followed by a state-
ment that there does, in fact, exist a need for a system and this document,
sometimes called a Requirements Determination, may be used for estab-
lishing policy or making decisions with regard to the allocation of funds
toward the design and rmplementation process. The first serious and
committed step is the performance of a Requirements Evaluation and
Analysis, in which all the various requirements of indicated or potential
users of the system would be examined and analyzed in order to produce
a document, considerably more formal than the determination document,
that would clearly indicate in a convincing manner the need for the sys-
tem. Of course the extent and formality of these procedures would be
more or less rigid, depending on the type and size of organization involved.
The requirements evaluation and analysis document will generally con-
tain such specifics as the number and type of persons who will use the
system, the amount of information that they generate and in what form,
the expected increase in volumes based upon present modes of operation,
and projections based upon improved modes of operation. Having such
information in hand will enable the next stage of the process to be per-
181
182 FILE STRUCTURES FOR ON-LINE SYSTEMS
Steffint
:0- on ..
Tr.inil...
' .... .....
.....
..... File >
io- "CI
-. Construc t ion ;g
Z
where large scale systems are required and where the special skills needed
to perform these procedures may not be available, the work in these
various blocks may be separately contracted. In fact, it is not unusual to
find outside contractors involved in part or in whole within the function-
ing of each of these blocks in the diagram.
Figure A2 presents the same information as Fig. A I except from a
personnel and management viewpoint. After the system design is com-
pleted a Development Manager will be appointed who should have three
supervisors reporting directly to him. One is responsible for Hardware
Procurement, which may fall into three general categories: the procure-
ment of central Processors and Mass Storage devices, the procurement of
Communications and Terminals if these are required, and the procure-
ment of noncomputerized hardware devices such as Film equipment,
Printing, and Duplicating equipment.
The second supervisor is responsible for Software Development and
Implementation, and this also divides into three broad categories: the
Operating (OP) System Interfaces and Executive Programs, the program-
ming of the Storage and Retrieval Subsystem, and the generation of vari-
ous Application Programs. The manufacturer of the computer usually
provides an operating system that will always include an assembler for the
machine language code, one or more compilers, and a mode of operation
which may involve some degree of time-sharing or on-line job submission.
The use of the operating system and, in particular, programming in the
assembly language may require some specialized knowledge that would
be the responsibility of this group leader to provide. In addition, an execu-
tive central program and a query language interpreter for the information
system may be required. The Storage and Retrieval Subsystem is the
basic executive program that generates computer files, updates them, and
retrieves information from them in response to calls from the System
Executive. Procedures that are to be performed on individual records as
they are retrieved or on subfiles of records that may be retrieved are called
application programs. These may be quite varied and numerous at the
outset and may continue to accumulate even after the system goes into
operation.
The third supervisor is concerned with Organizational Interfaces.
Basically he is a person who makes up for imperfections that nearly always
exist in the Final System Design. That is, he is fully in contact with the
personnel in the organization who will be using the system, and who have
been involved with all of the preceding steps in the implementation
process. He can therefore make on-the-spot or ad hoc interpretations of
the specification and design documents for the programmers. In addition
he is respon.~ible for Staffing and Training, the manual Input Operation
for file construction, and for insuring that all of the required services are
being met by the system as it is being implemented. This most particularly
pertains to the generation of the applications programs.
System
Development
Manager
Software
Hardware Or9anizat iona I
Development and
Procurement Interfaces
Implementation
>
>a
>a
t t t t t t f!!
Z
Processor Film,
and Mals Printin9,
Op System Applicat ions Input ~
Services
Interfaces Pr09rams Operations
Storage Duplicatin9
186
APPENDIX 187
It is a second property of this tree that each descriptor will appear only
once within the set of nodes of the path. That is, for instance, in the
path of the nodes 1, 1.1, and 1.1.2, those descriptors that are in node 1
are not in nodes 1.1 or 1.1.2; those that are in 1.1 are not in 1 or 1.1.2,
and those that are in 1.1.2 are not in 1 or 1.1.
This classification differs from those in which the descriptors are as-
signed according to a semantic hierarchy like Physics-Optics-Diffraction
in the DDC Thesaurus. Instead, the descriptors are placed in sets (Sh
S1.1, etc.) with no a priori assumptions made about the semantic
relationship. However, descriptors in the set S1 say, are used in com-
mon with those either in S1.1 and S1.2 or with further descendents of
S1.1 and SUo Hence, there is something more common or generic about
the usage of the descriptors of S1 than there is about the usage of de-
scriptors in lower level nodes.
Associated with each terminal node is a unit of machine storage called
the cell. Within a cell are stored the document records with descriptors
(keys) that are drawn from nodal sets that lie in paths that terminate
at the terminal node.
It is possible that a document descriptor set, Sd' may lie in a path that has
several terminal nodes to which it can be assigned. A decision would have
to be made as to which terminal node the document is to be assigned. For
example, Sa may be wholly contained in S1 U Sl1; how this decision is
188 FILE STRUCTURES FOR ON-LINE SYSTEMS
If')
N
N
-=
N
N
N
...: ..:
<Ii
~
...
Q)
c
0
N :ij
ro
(,)
N ;;::
-= "iii
CIl
ro
U
Q)
..c
en ~
,....;
III
00
i.i:
...J
W
>
W
...J
APPENDIX 189
The tree structure that is thus created is used for document retrieval
in the following way. First the nodes of the tree are numbered canonically,
where the number of fractions represents the level of the node, and each
fraction counts branches from the parent node (which in tum is repre-
sented by the next fraction to the left). The nodes of Fig. Bl are so
numbered.
Two tables are to be maintained on the DASD for decoding from a
query description to the cells that must be searched for document records
satisfying this description. The first is called the Key to Node Table and
will be denoted KNT. The second contains a list of all terminal nodes by
canonical number, each with its corresponding cell number or address.
This table will be denoted TNT. The KNT translates from a given key
to all nodes (by canonical number) in which the key appears. Retrieval
in response to a query consisting of a conjunction of keys is effected by
the following algorithm.
1) Using the KNT, form a table that places all nodes with the least
number of digits (fractions) in Column I, all nodes with the next
higher number of digits in Column II, and so forth. In addition,
beside each node number, the key number is placed in parentheses.
For exarp.plc, assume that the query contains a conjunction of
the Keys 1, 5, 8, and that the KNT indicates that Key 1 is in
nodes 1.1 and 1.3.8.5.2.1, key 5 is in nodes 1.1.2 and 1.3.8.5,
and key 8 is in node 1.3.8. The table formed according to the
above is as follows:
I II III IV
1.1 (1) 1.1.2 (5) 1.3.8.5 (5) 1.3.8.5.2.1 (1)
1.3.8 (8)
2) Using the table a search is made for a path that includes all the
descriptors in the query conjunction.
In the above example a path including the descriptors 8, 5, 1
is found in column II, III, IV. The algorithm for doing this is
strictly combinatorial. All nodes of Column I are compared with
those of Columns II, III, and IV, etc. This process should be
continued until all possible paths are found.
190 FILE STRUCTURES FOR ON-LINE SYSTEMS
This represents a valid path for the query 4, 7, and 16; hence a
path may contain a repeated node.
3) If no path (containing all of the query descriptors) can be found
in the table, then no such document exists. At this point the user
would have to modify his query either by removing or modifying
one or more of the keys in the conjunction.
If one or more paths do exist then for each path, a search in
the appropriate cells is required. These cells are found in the
following way: For each path select the last node (longest node
number) . A search is made using this node number in the
Terminal Node Table (TNT) to find all numbers of the TNT
which contain the decimal corresponding to the last node of the
path. These entries of the TNT indicate the cells that must be
searched.
For example. the path indicated by steps one and two above
would be 1.3.8.5, 1.3.8.5.2.1. The last node (longest node num-
ber) is 1.3.8.5.2.1. Assume that the TNT appears as follows:
1.1.3.4.1 18
1.2.1.1 19
1.2.2 20
1.2.4.6.1. 7.1 21
1.2.4.6.1.7.2 22
1.3.7.6 23
1.3.7.8 24
1.3.8.5.2.1.1 25
1.3.8.5.2.1.2.1 26
1.3.8.5.2.1.2.2 27
1.3.8.5.2.1.3 28
1.3.9.7 29
APPENDIX 191
If')
C\I
C\I
C\I
C\I
. C\I
C\I
Z
C\I
~
.=....
0
DO
.:
Qj
N .0
tV
....I
C\I
~
Z c\i
C\I III
Ilil
Z i;:
Z
C\I
.
Z
Z
--:
z
APPENDIX 193
First the algorithm will be generally described and then defined more
formally. T J is constructed by starting at a single highest level node of
TJo which contains all of the descriptors in the vocabulary (i.e., the union
of all descriptors used in document descriptions). In addition, all docu-
ments are associated with this top most node. In Fig. B2 this would be
node Nt. The descriptors of Nt are then distributed among some number,
N, of next (lower) level nodes. This distribution is based upon three
basic rules. In Fig. B2, N = 2 at this level, and the descriptors of Nt are
divided into nodes Nl.l and N1.2. The three rules for the partitioning are
as follows:
When the descriptor groups Nl.l and N1.2 are formed, the documents
that are comprised of descriptors from these respective groups are like-
wise assigned to these nodes. If a document could be assigned to more
than one node then it is assigned to one of the nodes based upon equaliza-
tion of the documents at a node. Hence, when the process is finished
each document will have been assigned to exactly one node, and the
union of all document descriptors at a node is the set of descriptors that
now are contained in that node. Hence N 1.1 would have associated with
it a set of documents D1.l, a set of descriptors which is the union of all
descriptors in the documents of Dl.l and which we have previously called
Nl.l itself; similarly node N1.2 has the set of documents D1.2, the union
of whose descriptors are called N 1.2. If D] is the set of all documents as-
sociated with N 1 , then the following relations hold, according to the above
description.
lA) Dl.lUD1.2=D 1
2A) Dl.l nD1.2 = g
3A) Nl.lUN1.2=N 1
4A) Nl.lnN1.2 # g (in general)
The tree T J may now be constructed by repartitioning each node, Nl.l
and N1.2 into some number, N, of nodes where this N mayor may not
be the same as the previous one. Then, both the descriptors of, say, Nl.l
and the documents of Dl.l will be distributed among N1.l 1 and Nl.l.2
194 FILE STRUCTURES FOR ON-LINE SYSTEMS
and among D1.1.1 and D1.1.2, respectively, according to the three rules.
The same four relations will again hold:
IB) Dl.1.1UDl.1.2=D1.1
2B) D 1.1.1n D1.1.2 = 9
3B) N 1.1.1U Nl.1.2 = N1.1
4B) N1.1.1UNl.1.2 =1= 9 (in general)
It is rule one, expressed formally as relation (1 A) or (1 B), that insures
that Tc will have Property I. Furthermore, when it is decided that the
process should stop, with no further partitioning of any of the nodes,
then it will still be the case that, for the terminal nodes of the tree (in
the case of Fig. B2, Nl.1.1, N1.1.2' N1.2.1, N1.2.2.1, N1.2.2.2, N1.2.2.S)
each document will be assigned to one and only one node, and that all
documents will be so assigned. Hence the requirement of having each
document assigned to a terminal node of Tc is met because the terminal
nodes of Tc are the same as those of T[ except with intersecting descriptors
removed to higher-level nodes.
The decision as to when to stop partitioning a particular node, N K, is
made by determining when the documents in DK and all of their associated
data will fit into the physical memory space designated as a cell.
This completes the general description of the T[ construction and indi-
cates how all of the requirements for the construction of To and the
assignment of documents to cells is met.
The graph of the Te tree is identical to that of the T[ tree; only the
nodal descriptor constituencies are different. A given set of sibling nodes
of Tc are generated by intersecting the corresponding set of T[ nodes and
deleting from the respective T[ nodes all descriptors in the common inter-
section. The residues constitute nodes of Te. The common descriptors
become the parent node. This process is then repeated for the parent
node siblings. The entire process starts at the terminal nodes and proceeds
in the above described manner to the apex.
PASS 1
The descriptions are added one at a time, starting with the beginning
of the input tape. Consider the addition of a description, D. The inclu-
sive groups are numbered 1, 2, 3 . . . N.
1) Find the group which contains the most descriptors of N. De-
note this Group i.
2) If there are two or more such groups, select the smaller group
and denote it as Group i.
3) If two or more of these from step two are equal in size, select
arbitrarily the smallest group number. Let thi,s be Group i.
4) Let the number of descriptors in Group i be denoted n, and the
number of descriptors of D that are not in Group i be denoted ai'
Let e be a positive integer 0, 1, 2 ...
Then, if it is the case that
(nl+aJ";;; (nj + aj) +e
PASS 2
1) The Input Tape is rewound.
2) If a description D appears in exactly one group, the descriptors
of D in that group are all flagged (i.e., are essential), and the
description is written onto an Output Tape along with its assigned
group number.
3) If D appears in more than one group, * the description is written
onto the intermediate tape, and no descriptors are flagged. This
is to say that a redundancy exists that may later be eliminated
by eliminating some of the descriptors from one or more groups.
PASS J
1) The Intermediate Tape is rewound.
2) If the descriptors of D are all flagged within at least one group
then write D onto the Output Tape along with anyone of these
group numbers, and move the intermediate tape to the next
description.
3) If step two is not the case, then select that group with the fewest
unftagged descriptors in D; flag them, and write D onto the Out-
put Tape along with the selected group number.
4) When the entire intermediate tape has been passed, eliminate all
unflagged descriptors.
• Note that in accordance with rule one, every description will be placed in at least one
group by PASS 1.
196 FILE STRUCTURES FOR ON-LINE SYSTEMS
The Output Tape can now be sorted by the assigned group numbers.
That is, all descriptions appearing in Group 1 are collected into a block,
those in Group 2 into a block, etc.
If a document description appears in more than one block, it is re-
moved from all blocks except the shortest in which it resides.
Each set of documents D K , corresponding to a node NK now sits in
a single block, having been sorted, and is ready for repartitioning if the
documents of D K , and their associated data still exceed the cell capacity.
Once a T/ has been so produced it should be possible to add new
descriptions to the file and update the classification without rerunning the
entire tape.
This incremental process can be accomplished by considering the new
descriptions to be an intermediate tape (like that produced by Pass 2),
and then running it through Pass 3 using the existing groups and the
corresponding e values that formerly produced them.
Table Bl
A FILE OF DOCUMENTS
Document Document
Number Description
1 2
1
2 3 4
1
3 3 6
1
4 5 6
1
5 2 4 11
6 2 3
7 4 13 14
8 4 11
9 6 7 8
10 9 10
11 10 11
12 911
13 11 12
14 13 14 15
The first or top level of the T/ contains one group consisting of all 15
descriptors. The first-level group will be broken into two inclusive groups
by the three-pass process. Each second-level group will then be divided
into two inclusive groups to form a third level.
In Table B2, (a) shows the partition of the first-level inclusive group
into 2 groups for e = 0 after Pass 1. Pass 2 in Table B2 (b) creates
APPENDIX 197
Table 82
PARTITION OF FIRST LEVEL INTO TWO INCLUSIVE GROUPS, for e =0
GROUP 1 2 Intermediate GROUP 1 2
Tape
1 1 1 1
2 3 1 2 2 3
5 4 9 10 5 4
6 6 6 6
4 2 4 2
11 13 11 13
7 14 7 14
8 9 8 15
10 10 10
9 15 9
12 12
Table B3 shows the tape blocks that are produced by Pass(es) 2 and
3 in which the descriptions from Table Bl are written along with a
designation of the group to which it has been assigned.
Table 83
TAPE CONTAINING DESCRIPTIONS BLOCKED ACCORDING TO THE
INCLUSIVE GROUPS OF FIGURE 82 (c)
1 2 1 3 4
1 5 6 1 3 6
2 4 11 2 3
5 11 4 13 14
6 7 8 13 14 15
9 10
10 11
9 11
11 12
Block 1 Block 2
Each of these blocks is then partitioned into two groups by the three-
pass process to produce a third level. The resulting tree is shown in
Fig. B3.
T c may now be generated from T I by intersecting the terminal nodes
of Tf, deleting the common descriptors from these nodes, and placing
them at a common (parent) higher-level node. The intersections continue
until an entire Tc is generated, as shown in Fig. B4.
Note that T(" of Fig. B4 possesses both Properties I and II.
Fig. B3. A Three Level TI for the 1,2,3,4.5.6.
Descriptions of Table Bl ....
\0
7.8. 9. 10. II. 00
12.13,14.15
~
t"'
t!l
1,2.4. 5, 6. 7- 1.2.3.4.6. (II
.-,j
8, 9. 10. 13. 14. ~
("l
II. 12 15 .-,j
c::~
t!l
(II
...,
o
~
~
1,2,4,9, 10, 1.5,6.7,8. 1.2. 3.4.13. 1.3.6.13. tz
II, 12 14 14.15 t!l
II I I
I 2 I 5 6 I 3 4 3 6
~
t!l
a::
(II
2 4 II 5 II 2 3 13 14 15
Documents ( 9 10 6 7 8 4 13 14
10 I I
9 II
,I I 12
~ ~ ~
Cell I Cell 2
---------- Cel13 Cell 4
Fig. 84. T. The Classification Tree Generated
----··1' 51
from T10f Fig. B3
> 5i 1.2
II 3,13,14
>
"II
51.1.1 "II
to!
2 z
2, 4, 9, 0
2,4 6,15 ~
10, 12, ~ a
I 2 I 5 6 I 3 4 3 6
2 4 II 5 1.1 2 3 13 14 15
10 6 7 8 4 13 14
Documents <109 I I
9 I I
II 12
""'--v--' ~ ~ ~
Cell I Cel12 Cell 3 Cell 4 \0
\0
-
200 FILE STRUCTURES FOR ON-LINE SYSTEMS
Table 84
THE KNT FOR FIG. 84
Key Nodes
1 1
2 1.1.1. 1.3.1
3 1.2
4 1.1.1. 1.2.1
5 1.1.2
6 1.1.2. 1.2.2
7 1.1.2
8 1.1.2
9 1.1.1
10 1.1.1
11 1.1
12 1.1.1
13 1.2
14 1.2
15 1.2.2
The Key to Node Table (KNT) for Fig. B4 appears in Table B4, and
the Terminal Node Table (TNT) appears in Table B5.
Table 85
THE TNT FOR FIG. 84
1.1.1 1
1.1.2 2
1.2.1 3
1.2.2 4
4. Conclusio ..
Bl, the system would identify the Tc path (1) - (1.2) in Fig. B4, and
indicate that a search of 5 documents in 2 cells was indicated. The user
could then request to see a list of more specific keys that also lay in the
same path, whereupon the system would display the keys (2,4) from
node S1.2.1 and (6,15) from node S1.2.2' A selection from either or both
of these sets would narrow the request in the only ways possible within
this collection. That is, selections from nodes S1.1.1 or S1.1.2 are ruled out
because of Property 1 of the tree, namely, that all descriptors in a file docu-
ment must lie within a path of the tree. Similarly, the user could ask for the
other descriptors at the lowest level of his query, namely, node S1.2, where-
upon he might see a more suitable key than 3 to combine with 1, or he
may want to form a disjunction with 3 in order to make his query more
inclusive. Finally, in the opposite sense, the user may request to see a
higher-level node in order to make his search more generic by including
more of the tree.
APPENDIX C
202
APPENDIX 203
random head access time is not applicable to head per track devices, as
indicated by a bar. The fifth column contains the serial data transmission
rate from the device to the channel, in kilobytes or characters per second.
The sixth column indicates the modularity for those devices that have re-
movable packs, cartridges, cells or magazines, giving the storage capacity in
megabytes for the storage module. The seventh column contains the track
Cl1pacity in 8 bit bytes or 6 bit characters. The eighth column presents
the capacity of one entire storage unit, in megabytes (or megacharacters);
sometimes the unit is the same as the module, as in the case of the IBM
2311 disk pack, and sometimes it is an aggregate of modules, as in the
case of the IBM 2314, or the RCA mass storage. The ninth column
contains the number of units that can be placed on a single controller
or channel. The tenth and last column indicates whether the hard-
ware automatically performs a read and verification after a write, with-
out necessitating another revolution. In those devices without this feature,
it is customary to read on a subsequent rotation and program verify
whenever it is written. This means that an additional rotation must be
added for every DASD write in file update formulations such as in Table
26 of Chapter VIII.
N
~
• All devices for use with B2500 and B3500 Processors. Comparable devices available for B5500, B6500, B7500, and B8500.
SAMPLE OF HONEYWELL DIRECT ACCESS
STORAGE DEVICES
Data
Transmission Track Unit Hardware Read
Rotation T, Rate K Modularity Capacity Capacity Units/ after Write
Model DASD Type (ms) (ms) Char/Sec (m Char) (Char) (m Char) Controller Verification
~
VI
N
o
""
SAMPLE OF IBM DIRECT ACCESS
STORAGE DEVICES
'f1
Data Track Unit Hardware Read t=:
DASD Rotation T, Transmission Modularity Capacity Capacity Units! after Write ttl
Model Type (ms) (ms) Rate (KB!S) (MB) (Bytes) (MB) Controller Verification til
>-l
'f1
2311 Disk Pack 25 75 156 7.25 3.625 7.25 8 No o
:>:I
(Movable
Head) o
ZI
--- t""
2314 . 25 75 312 29.175 7.294 233.4 8 No Z
ttl
IV
o
-....l
~
00
• KC/C
•• Characters
••• Per cartridge surface; may be turned over for another 1.6 MB
APPENDIX D
209
210 FILE STRUCTURES FOR ON-LINE SYSTEMS
211
INDEX
213
214 INDEX