Read and delete input/output operation for database management
AssigneeInternational Business Machines Corporation
InventorsRafal P. Konik, Roger A. Mittelstadt, Brian R. Muras, Mark W. Theuer
Life of this patent
Estimating the term…
Abstract
A computer-implemented method for improving database management includes selecting one or more database records that are requested based on a query statement. The one or more database records are read from a first database file. The one or more database records are copied from the first database file and stored to a memory. The one or more database records are deleted from the first database file at substantially the same time as the reading the one or more database records. The reading and the deleting occur through a single read and delete input/output (I/O) operation.
Claims13
A computer-implemented method for database management, comprising:
- selecting one or more database records that are requested based on a query statement;
- reading the one or more database records from a first database file, wherein the one or more database records are copied from the first database file in non-volatile disk storage device and stored to a memory, the memory being a Random Access Memory (RAM) memory array, the RAM being a volatile memory;
- deleting the one or more database records from the first database file at substantially the same time as the reading the one or more database records, wherein the reading and the deleting occur through a single read and delete input/output (I/O) operation, the single read and delete I/O operation requiring a single commit operation, the single read and delete I/O operation reducing an amount of movement of a read/write head of the disk storage device;
- and
- wherein the deleting the one or more database records includes:
- indicating, at a first time and before the selecting, when a delete flag will be set for any request,
- setting the delete flag at a second time to lock the one or more database records from being queried, and
- permanently deleting the one or more database records from the first database file and the memory by overwriting the one or more database records from the first database file and the memory at a third time, the third time being subsequent to the second time, the second time being subsequent to the first time.
A system for database management, the system comprising:
- a computing device having a processor and a memory;
- wherein the memory stores a query processor and a storage engine, wherein the query processor and the storage engine, when executed by the processor, are operable to:
- select one or more database records that are requested based on a query statement;
- read the one or more database records from a first database file, wherein the one or more database records are copied from the first database file and stored to a memory;
- delete the one or more database records from the first database file at substantially the same time as the reading the one or more database records, wherein the reading and the deleting occur through a single read and delete input/output (I/O) operation, the single read and delete I/O operation is compiled as a single instruction;
- wherein the deleting includes permanently deleting the one or more database records from the first database file and the memory by setting a delete flag at a first time to lock the one or more database records from being queried, and later overwriting the one or more database records from the first database file and the memory at a second time, the second time being subsequent to the first time;
- and
- sending, in response to a user request to view the one or more database records and subsequent to the reading the one or more database records, the one or more database records from the memory to a display screen memory, wherein the one or more database records are shown on a display screen, wherein after the user views the one or more database records on the display screen, a subsequent user cannot view the one or more database records on the display screen based on the deleting the one or more database records from the first database file at substantially the same time as the reading the one or more database records.
A computer program product comprising a computer readable storage medium having program code embodied therewith, the program code comprising computer readable program code configured for:
- selecting one or more database records that are requested based on a query statement;
- reading the one or more database records from a first database file, wherein the one or more database records are copied from the first database file and stored to a memory;
- deleting the one or more database records from the first database file at substantially the same time as the reading the one or more database records, wherein the reading and the deleting occur through a single read and delete input/output (I/O) operation, the single read and delete I/O operation reducing an amount of movement of a read/write head of a disk storage device;
- and
- wherein the deleting the one or more database records includes:
- indicating, at a first time and before the selecting, when a delete flag will be set for any request,
- setting the delete flag at a second time to lock the one or more database records from being queried, and
- permanently deleting the one or more database records from the first database file and the memory by overwriting the one or more database records from the first database file and the memory at a third time, the third time being subsequent to the second time, the second time being subsequent to the first time.
Dependencies are inferred from the claim text.