Patent ID: 7222123

Claim:
A method of combining data within a database system, the method comprising: performing a scan of a source data structure to obtain rows of data; storing as source data, separate from the source data structure, the rows obtained from the source data structure; performing a first merge operation to merge the rows from the source data into a first destination data structure; wherein performing the first merge operation includes inserting a set of one or more rows into the first destination data structure; wherein, within the destination data structure, each row in the set of rows is associated with a reference, wherein the reference is the row id of the row; for each row in the set of rows, storing at least one value from the row in an intermediate data structure in a manner that associates the at least one value with the reference of the row; and before the changes made by the first merge operation have been made permanent, using a reference to a row in the set of rows to search in the intermediate data structure for the at least one value from the row.