×

Database system with improved methods for updating records

  • US 5,842,196 A
  • Filed: 04/03/1996
  • Issued: 11/24/1998
  • Est. Priority Date: 04/03/1996
  • Status: Expired due to Term
First Claim
Patent Images

1. In a database system having a database storing a database table comprising a plurality of data pages, each data page capable of storing a plurality of data records, said data records storing information organized into particular database fields, said database table having an index for logically ordering said plurality of data records, said index comprising a plurality of index entries wherein each data record is referenced by a corresponding index entry, said database system providing a direct mode, and a deferred mode for updating the database table and the index, said direct mode for performing actual updates to the database table or the index as each data record is read during a first pass, and said deferred mode for updating the database table or the index by first marking data records or index entries during the first pass for actual updating during a second pass, an improved method for updating said data records, the method comprising:

  • receiving a query which specifies a change in value for a database filed whose values form a unique index for the database table; and

    performing said update by;

    in a first pass, scanning said data pages for said data records and changing any field value which is specified to change, so that said data records are updated in the direct mode,in conjunction with said scanning step occurring during the first pass, deleting any corresponding index entry which references a data record changed during said scanning step, so that any corresponding index entries are deleted in the direct mode,marking any index entry so deleted in the direct mode for inserting back into the index during a second pass, andafter completing said scanning step of the first pass, inserting in the second pass all such corresponding index entries back into the index which were marked during the first pass for insertion during the second pass, so that all such corresponding index entries are inserted back into the index in the deferred mode.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×