Method of Including Expandable Arrays in Persistent Expandable Data Structures
Original Publication Date: 1995-Jun-01
Included in the Prior Art Database: 2005-Mar-30
A method is disclosed for allowing arrays which may require future expansion to be imbedded in data structures which are persistent and may also require expansion.
Method of Including Expandable Arrays in Persistent
A method is
disclosed for allowing arrays which may require
future expansion to be imbedded in data structures which are
persistent and may also require expansion.
Data structures used in computer programming
arrays. Some arrays contain an indefinite number of elements; others
contain a fixed number of elements. When an array containing a fixed
number of elements is imbedded within a persistent data structure,
problems arise if the array must later be expanded to include more
It is usually
the case that a data structure contains
information (fields) other than the array. Depending on when this
information was added to the structure, it may either precede or
follow the array. If any data (fields) follow the array, then
expanding the array will cause dislocation of that data. Dislocation
may not be acceptable if the data must be shared between new software
which understands the new format and old software which recognizes
only the old format.
array could be placed at the end of the structure,
allowing for expansion of the array, this does not allow for
expansion of the data structure itself. Because the array is at the
end of the structure, there is no place to add new non-array fields
to the structure. Although space could be reserved in the body of
the data structure, in any long-lived structure it is likely that the
space needed will eventually exceed the reserved space. Therefore, a
time will come when new fields must be added after the array. A
common way of defining a data structure containing two imbedded
arrays is shown in "Fig. 1 - Traditional Method, in PL/AS" and "Fig.
2 - Traditional Method, in C".
When the data represented by the data
structure is of a
permanent nature and resides in locations other than memory (for
example, on disk), dislocation of data has the following
1. When a new version of a product causes dislocation, logic must
included to recognize and to handle both the new version and
old version of the structure. When old versions of the
are accessed, they must be converted to the new format.
2. When a new version of a product causes dislocation and must
the dislocated data with either previous versions of the
or other products which may be down-level, data access
occur. If no changes are made to the down-level versions or
products, then once the new product updates the structure to
new format, the down-level versions or products will be unable
recognize them. Down-level products or versions may reach
the array when they are trying to access data beyond the
If the down-level versions or products were rec...