Operations
When the user is interested in the contents of his whole file in solving the problem at hand, the datacomputer's job is simple in terms of information retrieval. There may be reformatting or reordering, but location of the right data to operate on is trivial. However, this will not be the standard usage of the datacomputer, particularly for the remote user.
For most problems, the datacomputer expects to subset the file before doing anything else. The larger the file compared to the subset, the less acceptable it is to transact with the full file in order to form the subset. And the datacomputer will have such enormous files that using anything but a very small subset in one problem is most unusual. Thus, subsetting without examining the entire file is a fundamental requirement.
Normally, the subset will be considered formed when a list of the relevant record id's or record addresses is known.
The index of the datacomputer file can be thought of as a collection of primitive record id lists that the file designer expected to be useful in forming interesting subsets. The values of all important fields can be indexed. For example, every word in a field containing a string of text might be indexed. In fact, an arbitrary function of the contents of the record, or the relation of the record to other records can be indexed.
The common logical operators (AND, OR and NOT) are defined for record subsets. Arbitrarily complex expressions of them can be evaluated with relatively little processor time or I/O. The ease of this operation results from careful design of the index and strategies, the most important of which is the parallel evaluation of the Boolean functions on large groups of records. Certain statistical operations--like counting the number of records satisfying a certain Boolean condition--can be done directly on the index. This can be used to derive question-answering strategies heuristically, or can be the direct input to a statistical study.
Once the index has done all it can in subsetting, attention turns to the records themselves. Certain conditions cannot be evaluated using the index; an obvious case is the selection of records based on the value of an unindexed field. Also, certain data structures cannot be explicitly represented in the file:record:field model. These must be constructed by the user, out of groups of records linked by pointers, or using other special mechanisms. The class of operations that is useful in further record selection consists of field content testing, pointer chasing, simple computation in the numerical and symbolic senses, and various operations below the data element level, such as pattern matching, string manipulation, etc. Such operations require a control structure approaching that of the general purpose higher level language. It is our intention to make all of this available, though not with the goal of providing a computation facility, but rather, a data management facility that is capable of using as much knowledge as the programmer can supply.
A simple set of primitives is required for file maintenance in the data structure we are talking about. The operations are:
- add a field/record
- delete a field/record
- replace a field/record.
The difficult part, as in retrieval, is locating the element to be operated on. Notice that individual record formats can be changed at will: the set of possible formats is limited only by the file description.
When record contents are changed, index entries that are a function of them must be changed also. When the function determining what is to be indexed is part of the file description, the maintenance of the index is automatically performed by the system. Otherwise, this is the responsibility of the user.
All fields in a record can be optional, variable length, allowed to occur an arbitrary number of times (up to some fixed limit for each field). Fields can be present and later be deleted from any record. Fields can be added to the file description at any time. The only reason for limiting the flexibility of a record format is to reduce storage.