Deleting rows from tables in a database without an index
AssigneeInternational Business Machines Corporation
InventorsAndreas Brodt, Oliver Koeth, Daniel Martin, Knut Stolze
Life of this patent
Estimating the term…
Abstract
A method for deleting a row from a table in a database system comprises logically deleting the row in the first table in the database system by inserting a key of the row into a corresponding row of a dedicated table in the database system; querying the dedicated table during a query against the first table to identify the corresponding row in the dedicated table; and in response to identifying the corresponding row in the dedicated table, deleting the row from the first table and the corresponding row from the dedicated table as part of query processing during a subsequent query.
Claims9
A database system comprising:
- a memory configured to store a first table comprising a plurality of rows and a dedicated table;
- and
- a processing unit coupled to the memory and configured to logically delete a selected row in the first table by inserting a key of the selected row into a corresponding row of the dedicated table;
- wherein the processing unit is further configured to query the dedicated table while executing a query against the first table to identify the corresponding row in the dedicated table;
- and
- wherein, in response to identifying the corresponding row in the dedicated table, the processing unit is configured to delete the first row from the first table and the corresponding row from the dedicated table as part of query processing during a subsequent query;
- wherein each row in the first table, as well as each row in the dedicated table, comprises a create timestamp attribute and a delete timestamp attribute;
- wherein the create timestamp attribute of the corresponding row in the dedicated table holds the delete timestamp value of a corresponding delete operation of the selected row in the first table.
A program product comprising a computer readable storage medium having program instructions embodied thereon, wherein the program instructions are configured, when executed by at least one programmable processor, to cause the at least one programmable processor to:
- logically delete a selected row in a first table in a database system by inserting a key of the selected row into a corresponding row of a dedicated table in the database system;
- query the dedicated table during a query against the first table to identify the corresponding row in the dedicated table;
- and
- in response to identifying the corresponding row in the dedicated table, delete the selected row from the first table and the corresponding row from the dedicated table as part of query processing during a subsequent query;
- wherein each row in the first table, as well as each row in the dedicated table, comprises a create timestamp attribute and a delete timestamp attribute;
- and
- wherein the program instructions are further configured to cause the at least one programmable processor to delete the selected row in the first table and the corresponding row in the dedicated table by setting the delete timestamp value of the selected row and the delete timestamp value of the corresponding row of the dedicated table to the create timestamp value of the corresponding row of the dedicated table.
Dependencies are inferred from the claim text.