Browse Prior Art Database

High Concurrency Data Base File Inserts

IP.com Disclosure Number: IPCOM000102201D
Original Publication Date: 1990-Nov-01
Included in the Prior Art Database: 2005-Mar-17

Publishing Venue

IBM

Related People

Ricard, GR: AUTHOR [+4]

Abstract

Insert into the standard file model is simply the process of placing a new record or set of records in the file following all the currently existing records. While simple in concept, the process actually involves many steps. Allocation of record positions for the new records, mapping the user's view of the records into the file's view, updating any logical views (indexes) associated with the file, moving the record data, and a final atomic operation indicating the insert is complete must all be performed. The traditional approach is to seize the file or the file's insert point for the duration of the above steps to assure other inserters/modifiers cannot interfere.

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

High Concurrency Data Base File Inserts

       Insert into the standard file model is simply the
process of placing a new record or set of records in the file
following all the currently existing records.  While simple in
concept, the process actually involves many steps. Allocation of
record positions for the new records, mapping the user's view of the
records into the file's view, updating any logical views (indexes)
associated with the file, moving the record data, and a final atomic
operation indicating the insert is complete must all be performed.
The traditional approach is to seize the file or the file's insert
point for the duration of the above steps to assure other
inserters/modifiers cannot interfere.  This can lead to needless
contention for the file considering that many of the more costly
steps including mapping the user's view of the records, updating the
logical views, and moving the physical data are almost completely
independent of one another for individual records.  A method is
described that minimizes file contention by providing as much overlap
of the above steps as possible among concurrent inserters.

      Consider the steps of the insert process and their impact if
performed concurrently:
-    ALLOCATION OF SPACE FOR THE NEW RECORDS requires that unused
record positions be provided for the new records following all
records that currently exist.  This newly allocated space is then
assigned to house the records being inserted.  Space allocation must
be serialized among concurrent inserters to assure that the same
record positions are not assigned to multiple inserters. However,
there is no dependency between the space allocation step and the
remainder of the insert process.  Once the allocation step is
performed, there is no need to remain serialized until the completion
of the insert.
-    MAPPING THE USER'S VIEW OF THE RECORDS INTO THE FILE'S VIEW is
the process of transforming the user-provided data to be inserted
into the format expected in the data base file.  Zoned fields could
be converted to floating point, lowercase data could be uppercased,
etc.  This process is completely independent for individual records
since the transformations only effect a single record's data.
Therefore, record mapping can occur simultaneously for multiple
inserters.
-    UPDATING THE LOGICAL VIEWS (INDEXES) OVER THE FILE is simply the
maintenance required to keep a logical view current during insertion.
It is obvious that separate logical views over the same physical data
can be processed concurrently by multiple inserters.  It is also
possible to process a single logical view concurrently provided that
the mechanism for supporting the logical view (usually an index) has
internal seizing to assure consistency when being accessed by
multiple inserters.
-    MOVING THE PHYSICAL DATA is simply moving the data to be
inserted into the physical file.  Since this process is completely
independent for individu...