Automatically setting an auto-purge value to multiple tables within a database
Abstract
A computer-implemented method includes: receiving, by a computing device, a database-level auto_purge value for a database having a plurality of tables, wherein the database-level auto_purge value represents a value associated with the entire database for when data is set to be purged or deleted from the plurality of tables in the database; setting, by the computing device, the database-level auto_purge value for the database; setting, by the computing device, table-level auto_purge values for the plurality of tables included in the database based on the database-level auto_purge value; and automatically purging data in the plurality of tables based on the table-level auto_purge values.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer-implemented method comprising:
receiving, by a computing device, a database-level auto_purge value for a database having a plurality of tables, wherein the database-level auto_purge value represents a value associated with the entire database for when data is set to be purged or deleted from the plurality of tables in the database; setting, by the computing device, the database-level auto_purge value for the database; setting, by the computing device, table-level auto_purge values for the plurality of tables included in the database, based on the database-level auto_purge value; and automatically purging data in the plurality of tables based on the table-level auto_purge values.
2 . The method of claim 1 , further comprising adding a column and a corresponding update_date value to each row in the plurality of tables based on the setting the table-level auto-purge values.
3 . The method of claim 2 , wherein the update_date value corresponds to a current date.
4 . The method of claim 2 , further comprising modifying the update_date value for a row in the plurality of tables when data in the row in the plurality of tables is modified.
5 . The method of claim 2 , further comprising adding a column and a corresponding auto_purge_date value to each row in the plurality of tables based on setting the table-level auto-purge values, wherein each of the auto_purge_date values corresponds to the update_date values plus the table-level auto_purge values.
6 . The method of claim 1 , further comprising:
receiving an update to the table-level auto_purge value for a particular table of the plurality of tables; and setting the table-level auto_purge value to the updated table-level auto_purge value only for the particular table of the plurality of tables.
7 . The method of claim 1 , further comprising:
receiving an update to the database-level auto_purge value; and setting the table-level auto_purge values to the updated table-level auto_purge value for the plurality of tables based on receiving the update to the database-level auto_purge value.
8 . The method of claim 1 , wherein the database-level auto_purge value is received as a single user instruction.
9 . The method of claim 1 , wherein the steps of claim 1 are performed by and integrated within a database application that hosts the database.
10 . The method of claim 1 , wherein a service provider at least one of creates, maintains, deploys and supports the computing device.
11 . The method of claim 1 , wherein steps of claim 1 are provided by a service provider on a subscription, advertising, and/or fee basis.
12 . The method of claim 1 , wherein the computing device includes software provided as a service in a cloud environment.
13 . The method of claim 1 , further comprising deploying a system for setting the table-level auto_purge values for the plurality of tables with a single user instruction, comprising providing a computer infrastructure operable to perform the steps of claim 1 .
14 . A computer program product for setting table-level auto_purge values for a plurality of tables with a single user instruction, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computing device to cause the computing device to:
receive a database-level auto_purge value for a database having the plurality of tables, wherein the database-level auto_purge value represents a value associated with the entire database for when data is set to be purged or deleted from the plurality of tables in the database; set the database-level auto_purge value for the database; set table-level auto_purge values for the plurality of tables associated with the database, wherein the table-level auto_purge values match the database-level auto_purge value or a predefined minimum database-level auto_purge value; and automatically purge data in the plurality of tables based on the table-level auto_purge values.
15 . The computer program product of claim 14 , wherein the program instructions for the automatically purging the data in the plurality of tables cause the computing device to:
determine respective ages of respective data records stored in the plurality of tables by comparing a current date with respective update_date values representing when the respective data records were last modified; and purge the data records whose ages are equal to or greater than the table-level auto_purge values.
16 . The computer program product of claim 14 , wherein the program instructions further cause the computing device to authenticate a source of the received database-level auto_purge value, wherein setting the database-level auto_purge value is based on authenticating the source.
17 . The computer program product of claim 14 , wherein the program instructions further cause the computing device to receive an instruction to turn on an auto-purge feature for the database, wherein the automatically purging the data in the plurality of tables is based on receiving the instruction to turn on the auto-purge feature.
18 . The computer program product of claim 14 , wherein the program instructions further cause the computing device to:
receive an instruction to create a new table in the database; and automatically set the table-level auto_purge value for the new table to match the database-level auto_purge value.
19 . A system comprising:
a CPU, a computer readable memory and a computer readable storage medium associated with a computing device; program instructions to receive a database-level auto_purge value for a database having a plurality of tables, wherein the database-level auto_purge value represents a value associated with the entire database for when data is set to be purged or deleted from the plurality of tables in the database; program instructions to set the database-level auto_purge value for the database; program instructions to set table-level auto_purge values for the plurality of tables associated with the database, wherein the table-level auto_purge values match the database-level auto_purge value or a predefined minimum database-level auto_purge value; program instructions to store and maintain respective update_date values for each data record stored in the plurality of tables, wherein the respective update_date values represent a date in which each data record was last modified; program instructions to automatically purge data records in the plurality of tables based on the table-level auto_purge values, a current date, and the respective update_date values, wherein the program instructions are stored on the computer readable storage medium for execution by the CPU via the computer readable memory.
20 . The system of claim 19 , further comprising program instructions to store and maintain respective auto_purge_date values for each data record identifying a date in which each data record will be purged, wherein the respective auto_purge_date values are based on the table-level auto_purge values and the respective update_date values.Join the waitlist — get patent alerts
Track US2018067972A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.