Data Base Organization
The database contains all information stored in the datacomputer. It is a set of files, which are named, physically distinct, collections of data.
The location of one file, the file directory, is known to the system. It contains the names, locations, and certain attributes of all the other files. Access to this file is restricted.
Internally, each file has its own organization, but each organization is a particular application of a general model. The particular application is defined by a file description associated with the file.
In the general model, each file contains uniquely numbered records. Each record contains named fields. A field of a certain name may occur more than once in a given record, and a unique number is associated with each occurrence. A field contains an elementary piece of data, the value of the field.
The records are variable in format and size. Fields are variable in length.
In addition to the records themselves; each file can contain an index. The system maintains the index to the specifications of the user. Conceptually, the index contains lists of pointers to records having certain properties. A typical list might point to the records containing the field STATE with the value MASSACHUSETTS.
The system supplies a unique, permanent, identifier for each record. This identifier maps trivially into a location in the file, or at worst, into a small region in which the record can be quickly located. The identifier is used to pointers to the record, both from the index and from other records.
Besides the physical ordering, defined by record location, a logical ordering will be maintained on request by the system. This can be based on some simple function of record contents, such as the value of certain fields. Alternatively, the user can compute the function, and simply supply the result (for example, by saying "insert this record after that one"). Retrieval from such ordered files can be made either in physical or logical order.
In all such ordered files, if insertions are made, space must be reserved for them and garbage collection must be done periodically. A single field value is viewed as a homogeneous string of characters or basic data units. It is described by giving the type (e.g., ASCII, BIT, binary integer, etc.) and the length is some unit associated with the type. When the length of a field is constant throughout the file, it is stored in the file description; otherwise it appears with each occurrence of the field. The type of a field is constant.
The information in the file description is sufficient to parse a record into (field name, value) pairs. Also, given such a set of pairs, and a file description, the system can produce a record satisfying the description. Mapping in either direction, there is only one possible result.
With a record, a file description, and a (field name, value) pair to store in the record, there is also only one new record that can result.
Thus a file description defines all the possible formats for a record from a particular file.