Techniques for data retention
Systems and techniques for managing data in a relational database environment and a non-relational database environment. Data in the relational database environment that is static and to be maintained beyond a preselected threshold length of time is identified. The data is copied from the relational database and stored in the data the non-relational database. Access to the data is provided from the non-relational database via a user interface that accesses both the relational database and the non-relational database.
1. A method, comprising:
obtaining a data retention configuration associated with a tenant of a multitenant computing environment, the data retention configuration indicating one or more parameters defining data to be copied from a relational database to a non-relational database;
enqueuing a message corresponding to first data, the message including the one or more parameters;
copying at least a chunk of the first data, identified from the relational database based on the enqueued message, to the non-relational database, wherein the message is enqueued again until all of the first data has been copied to the non-relational database;
obtaining a query received via a user interface, the query being received in a relational database language;
transforming the query received in the relational database language to multiple scans using one or more keys of the query;
performing the multiple scans on the non-relational database;
merging results of the performed multiple scans on the non-relational database; and
providing the merged results via the user interface.
2. The method of claim 1 , wherein the first data comprise field history data.
3. The method of claim 1 , further comprising:
identifying the first data in response to detection of one or more trigger conditions.
4. The method of claim 1 , further comprising:
deleting the first data from the relational database.
5. A system, comprising:
a database system implemented using at least a server computing device, the database system configurable to cause:
obtaining a data retention configuration associated with a tenant of a multitenant computing environment, the data retention configuration indicating one or more parameters defining data to be copied from a relational database to a non-relational database;
enqueuing a message corresponding to the first data, the message including the one or more parameters;
copying at least a chunk of the first data, identified from the relational database based on the enqueued message, to the non-relational database, wherein the message is enqueued again until all of the first data has been copied to the non-relational database;
obtaining a query received via a user interface, the query being received in a relational database language;
transforming the query received in the relational database language to multiple scans using one or more keys of the query;
performing the multiple scans on the non-relational database;
merging results of the performed multiple scans on the non-relational database; and
providing the merged results via the user interface.
6. The system of claim 5 , wherein the first data comprise field history data.
7. The system of claim 5 , further comprising:
identifying the first data in response to detection of one or more trigger conditions.
8. The system of claim 5 , the database system further configurable to cause:
deleting the first data from the relational database.
9. A computer program product comprising computer-readable program code capable of being executed by one or more processors when retrieved from a non-transitory computer-readable medium, the program code comprising computer-readable instructions configurable to cause:
obtaining a data retention configuration associated with a tenant of a multitenant computing environment, the data retention configuration indicating one or more parameters defining data to be copied from a relational database to a non-relational database;
enqueuing a message corresponding to first data, the message including the one or more parameters;
copying at least a chunk of the first data, identified from the relational database based on the enqueued message, to the non-relational database, wherein the message is enqueued again until all of the first data has been copied to the non-relational database;
obtaining a query received via a user interface, the query being received in a relational database language;
transforming the query received in the relational database language to multiple scans using one or more keys of the query;
performing the multiple scans on the non-relational database;
merging results of the performed multiple scans on the non-relational database; and
providing the merged results via the user interface.
10. The computer program product of claim 9 , wherein the first data comprise field history data.
11. The computer program product of claim 9 , the program code comprising computer-readable instructions further configurable to cause:
identifying the first data in response to detection of one or more trigger conditions.
12. The computer program product of claim 9 , the program code comprising computer-readable instructions further configurable to cause:
deleting the first data from the relational database.