Browse Prior Art Database

Method of Including Expandable Arrays in Persistent Expandable Data Structures

IP.com Disclosure Number: IPCOM000115683D
Original Publication Date: 1995-Jun-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 6 page(s) / 167K

Publishing Venue

IBM

Related People

Ferziger, RL: AUTHOR

Abstract

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.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 45% of the total text.

Method of Including Expandable Arrays in Persistent Expandable Data
Structures

      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 often include
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
elements.

      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.

      While the 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
ramifications:
  1.  When a new version of a product causes dislocation, logic must
be
       included to recognize and to handle both the new version and
the
       old version of the structure.  When old versions of the
structure
       are accessed, they must be converted to the new format.
  2.  When a new version of a product causes dislocation and must
share
       the dislocated data with either previous versions of the
product
       or other products which may be down-level, data access
problems
       occur.  If no changes are made to the down-level versions or
       products, then once the new product updates the structure to
the
       new format, the down-level versions or products will be unable
to
       recognize them.  Down-level products or versions may reach
into
       the array when they are trying to access data beyond the
array.
        If the down-level versions or products were rec...