Patent ID: 8682941

Claim:
A database apparatus sequentially stores logical records from a leading position of a subrange, the database apparatus comprising: a processor detects a logical record to be moved from a rear portion of the subrange, the subrange being configured by a plurality of logical pages, sets one of the logical pages including the logical record to be moved as a source logical page of the logical record to be moved, sequentially detects space areas from the leading position of the subrange, sets one of the logical pages including a space area in which the logical record to be moved stored as a destination logical page of a logical record, performs exclusive control only on the destination logical page and the source logical page, and moves the logical record to be moved from the source logical page to the space area of the destination logical record, wherein a rearrangement is executed such that scattered space areas are collected by sequentially moving a logical record in the source logical page to the space area in the destination logical page progressing backward from the space area in one of the logical pages of the leading position of the subrange; and the logical record to be moved is sequentially detected toward the leading position from one of the logical pages immediately before a trailing logical page of the subrange.