Reduction of join operations when archiving related database tables
First Claim
Patent Images
1. A method for archiving data, comprising:
- receiving at a computer including a processor a list of tables to be archived, wherein one table is a root table and each other table is a child table, wherein at least one child table has a parent table that is not the root table; and
processing the list by walking an archive unit tree from top to bottom, wherein the archive unit tree represents the list of tables to be archived, and by;
archiving the root table in the list to create parent archive data in a parent archive table, wherein the parent archive data represents data removed from the parent table; and
processing each child table in the list by selecting a next child table in the list to be archived whose immediate parent table has already been archived, and for the selected child table;
receiving information to generate a predicate from a user;
generating a statement to perform the join operation that includes the predicate to qualify the rows of the child table that are to be archived; and
executing the statement to perform the join operation on the child table and the parent archive table to create child archive data in a child archive table, wherein the child archive table is capable of being a parent archive table for another child table in the list, wherein the parent archive data is used to qualify rows of the child table that are to be moved from the child table into the child archive data, and wherein the join uses columns in the child table and the parent archive table that represent connection keys between the child table and the parent archive table.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are techniques for receiving a request to archive a child table. In response to receiving the request, a join operation is performed on the child table and parent archive data to create child archive data.
36 Citations
12 Claims
-
1. A method for archiving data, comprising:
-
receiving at a computer including a processor a list of tables to be archived, wherein one table is a root table and each other table is a child table, wherein at least one child table has a parent table that is not the root table; and processing the list by walking an archive unit tree from top to bottom, wherein the archive unit tree represents the list of tables to be archived, and by; archiving the root table in the list to create parent archive data in a parent archive table, wherein the parent archive data represents data removed from the parent table; and processing each child table in the list by selecting a next child table in the list to be archived whose immediate parent table has already been archived, and for the selected child table; receiving information to generate a predicate from a user; generating a statement to perform the join operation that includes the predicate to qualify the rows of the child table that are to be archived; and executing the statement to perform the join operation on the child table and the parent archive table to create child archive data in a child archive table, wherein the child archive table is capable of being a parent archive table for another child table in the list, wherein the parent archive data is used to qualify rows of the child table that are to be moved from the child table into the child archive data, and wherein the join uses columns in the child table and the parent archive table that represent connection keys between the child table and the parent archive table. - View Dependent Claims (2, 3, 4)
-
-
5. A computer program product for archiving data comprising a computer readable storage medium including a computer readable program, wherein the computer readable program when executed by a processor on a computer causes the computer to:
-
receive a list of tables to be archived, wherein one table is a root table and each other table is a child table, wherein at least one child table has a parent table that is not the root table; and process the list by walking an archive unit tree from top to bottom, wherein the archive unit tree represents the list of tables to be archived, and by; archiving the root table in the list to create parent archive data in a parent archive table, wherein the parent archive data represents data removed from the parent table; and processing each child table in the list by selecting a next child table in the list to be archived whose immediate parent table has already been archived, and for the selected child table; receiving information to generate a predicate from a user; generating a statement to perform the join operation that includes the predicate to qualify the rows of the child table that are to be archived; and executing the statement to perform the join operation on the child table and the parent archive table to create child archive data in a child archive table, wherein the child archive table is capable of being a parent archive table for another child table in the list, wherein the parent archive data is used to qualify rows of the child table that are to be moved from the child table into the child archive data, and wherein the join uses columns in the child table and the parent archive table that represent connection keys between the child table and the parent archive table. - View Dependent Claims (6, 7, 8)
-
-
9. A system for archiving data, comprising:
-
a processor; and hardware logic performing operations, the operations comprising; receiving at a computer including a processor a list of tables to be archived, wherein one table is a root table and each other table is a child table, wherein at least one child table has a parent table that is not the root table; and processing the list by walking an archive unit tree from top to bottom, wherein the archive unit tree represents the list of tables to be archived, and by; archiving the root table in the list to create parent archive data in a parent archive table, wherein the parent archive data represents data removed from the parent table; and processing each child table in the list by selecting a next child table in the list to be archived whose immediate parent table has already been archived, and for the selected child table; receiving information to generate a predicate from a user; generating a statement to perform the join operation that includes the predicate to qualify the rows of the child table that are to be archived; and executing the statement to perform the join operation on the child table and the parent archive table to create child archive data in a child archive table, wherein the child archive table is capable of being a parent archive table for another child table in the list, wherein the parent archive data is used to qualify rows of the child table that are to be moved from the child table into the child archive data, and wherein the join uses columns in the child table and the parent archive table that represent connection keys between the child table and the parent archive table. - View Dependent Claims (10, 11, 12)
-
Specification