Method, apparatus, and program for capturing data changes utilizing data-space tracking
First Claim
1. A method of reorganizing a database and concurrently providing access to the database for updates, the database including an original data-space having a plurality of original data-elements and a shadow data-space having a plurality of shadow data-elements, each of the plurality of original data-elements including a change flag, the method comprising:
- copying contents of an original data-element within the original data-space to a shadow data-element within the shadow data-space;
reorganizing the shadow data-space;
setting the change flag of a first original data-element among the plurality of original data-elements that is changed after the contents of the first original data-element are copied to the shadow data-element to indicate that the contents of the first original data-element are changed after the contents of the first original data-element are copied to the shadow data-element;
determining that the contents of the first original data-element that are changed after the contents of the first original data-element are copied to the shadow data-element, based on the change flag; and
copying data from a location of the changed first original data-element to a location of a shadow data-element in the reorganized shadow data-space corresponding to the changed first original data-element, in response to the determining.
0 Assignments
0 Petitions
Accused Products
Abstract
A method, apparatus, and program for reorganizing a database while concurrently providing access to the database for updates. In an exemplary embodiment of the invention, an on-line reorganization facility (ORF) uses index data-spaces that point to other data-spaces, referred to as data data-spaces, to efficiently track and coordinate information about the data-elements in an original data-space operated upon by a reorganization process. A relative base address of a data-element in an index data-space can be derived from a relative base address of a data-element in an original data-space, and vice versa. An index data-space data-element contains a location of a data-element in a data data-space that tracks change information related to a corresponding data-element in the original data-space. Tracked changes are later applied to the newly reorganized data-space to assure consistency and integrity of the data. Tracked changes include the location in the original data-space where the change occurred and a flag indicting the type of change.
-
Citations
11 Claims
-
1. A method of reorganizing a database and concurrently providing access to the database for updates, the database including an original data-space having a plurality of original data-elements and a shadow data-space having a plurality of shadow data-elements, each of the plurality of original data-elements including a change flag, the method comprising:
-
copying contents of an original data-element within the original data-space to a shadow data-element within the shadow data-space; reorganizing the shadow data-space; setting the change flag of a first original data-element among the plurality of original data-elements that is changed after the contents of the first original data-element are copied to the shadow data-element to indicate that the contents of the first original data-element are changed after the contents of the first original data-element are copied to the shadow data-element; determining that the contents of the first original data-element that are changed after the contents of the first original data-element are copied to the shadow data-element, based on the change flag; and copying data from a location of the changed first original data-element to a location of a shadow data-element in the reorganized shadow data-space corresponding to the changed first original data-element, in response to the determining.
-
-
2. An apparatus for reorganizing information in a computer system having an original data-space that contains a plurality of sequentially stored original data-elements, a shadow data-space that contains a plurality of sequentially stored shadow data-elements, a data data-space that contains a plurality of sequentially stored data data-elements, each of the plurality of data data-elements including a change flag, and an index data-space that contains a plurality of sequentially stored index data-elements, the apparatus comprising:
-
a reorganization module configured to copy the contents of a first original data-element in the original data-space to a corresponding shadow data-element in the shadow data-space and to associate the first original data-element and shadow data-element using a data data-element; a log intercept module configured to intercept a log request concerning a change in the first original data-element after the reorganization module copies the contents of the first original data-element to the corresponding shadow data-element and to update the change flag of a data data-element associated with the first original data-element to indicate that a change has occurred in the first original data-element after the reorganization module copies the contents of the first original data-element to the corresponding shadow data-element; and a pending change module configured to detect the change in the first original data-element based on the updated change flag of the data-data element associated with the first original data-element and apply the change in the first original data-element to the shadow data-element corresponding to the first original data-element, in response to detecting the change. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer program embodied on a computer readable medium for reorganizing a database and concurrently providing access to the database for updates, the database including an original data-space having a plurality of original data-elements, a shadow data-space having a plurality of shadow data-elements, a data data-space having a plurality of data data-elements, each of the plurality of data data-elements including a change flag, and an index data-space having a plurality of index data-elements, the method comprising:
-
program instructions for copying contents of a first original data-element within the original data-space to a shadow data-element within the shadow data-space and associating the first original data-element and shadow data-element using a data data-element; program instructions for reorganizing the shadow data-space; program instructions for keeping track of a location of an original data-element that is changed after the contents of the original data-element are copied to the shadow data-element by updating the change flag of the data data-element that is located using an index data-element after the contents of the first original data-element are copied to the shadow data-element to indicate that the contents of the first original data-element are changed after the contents of the first original data-element are copied to the shadow data-element; program instructions for determining that the contents of the first original data-element are changed after the contents of the first original data-element are copied to the shadow data-element, based on the change flag; and program instructions for copying data from a location of the changed first original data-element to a location of a shadow data-element in the reorganized shadow data-space corresponding to the changed first original data-element, in response to the determining.
-
Specification