Systems and methods for managing offline database access
A computer-implemented method for managing access to data stored in a database is provided. The method includes storing in the database a switch parameter having a first value, storing in the database at least two instances of a data object wherein each of the instances includes a unique identifier, receiving a client query from a requestor, determining by the computing device an active instance from the at least two instances based at least in part on comparing the first value of the switch parameter to the unique identifier of each instance, modifying by the computing device the client query at least in part based on the determined active instance to create a resultant query, executing the resultant query against the active instance to generate a resultant data, and providing the resultant data to the requestor.
1 . A computer-implemented method for improving accessibility of data objects stored in an online database between computing devices by providing uninterrupted access to the data objects when the online database is undergoing maintenance operations when the data objects would be otherwise inaccessible, the online database including a view function and a plurality of data objects, the method using a computing device having at least one processor communicatively coupled to the online database, the method comprising:
storing, in the online database, the switch parameter and the data object, the switch parameter including a first unique identifier of the plurality of unique identifiers of the plurality of instances, the first unique identifier corresponding to a first instance of the data object, the first instance of the data object being the active instance and the other instances of the plurality of instances being the inactive instances;
receiving, by the view function associated with the switch parameter of the online database, a client query from a requestor, wherein the client query is directed to a data object of the plurality of data objects stored in the online database, the data object having a plurality of instances stored in the online database storing the data object, each of the plurality of instances of the data object (i) identified by a corresponding one of a plurality of unique identifiers and (ii) represented by a database table, wherein the switch parameter is a unique identifier indicative of a status of an instance of a data object of the plurality of data objects stored in the online database, wherein the status includes an active status or an inactive status when the data object of the online database is undergoing a maintenance operation;
modifying the received client query, by the view function, based on the switch parameter to create a resultant query defining a plurality of sub-queries each (i) including the switch parameter and (ii) directed to a corresponding one of the plurality of instances, each respective sub-query configured to return results only if the switch parameter matches one of the plurality of unique identifiers associated with the corresponding instance of the data object;
generating resultant data from the online database by executing the resultant query, the resultant data including output from the active instance of the data object and excluding output from the other instances of the plurality of instances of the data object, wherein the other instances are designated as inactive instances, wherein executing the resultant query includes comparing, by each sub-query, each unique identifier of each corresponding instance of the data object to the switch parameter, and wherein one or more operations are performed on at least one inactive instance of the other instances of the data object while the active instance of the data object provides access to data from the online database storing the plurality of data objects; and
providing the resultant data to the requestor in response to the client query.
2 . The method of claim 1 further comprising:
receiving, by the computing device, an update command including a second unique identifier of the plurality of unique identifiers, wherein the second unique identifier corresponds to a second instance of the data object; and
updating, by the view function, the switch parameter to include the second unique identifier and exclude the first unique identifier, such that the first instance of the data object becomes one of the inactive instances of the data object, and the second instance of the data object becomes the active instance of the data object, wherein the resultant data generated in response to one of the sub-queries matching the second unique identifier of the active instance to the switch parameter.
3 . The method of claim 1 , wherein the view function is configured to modify client queries received from a client computing device associated with the requestor to access the active instance.
4 . The method of claim 1 further comprising storing, in the online database, the plurality of unique identifiers.
5 . The method of claim 1 further comprising performing at least one of updating, data loading, or maintenance on at least one inactive instance of the inactive instances.
6 . The method of claim 1 further comprising separating the online database into at least two partitions, wherein each of the at least two partitions includes a unique identifier associated with each of the plurality of instances of the data object.
7 . A computer system for improving accessibility of data objects stored in an online database between computing devices by providing uninterrupted access of the data objects when the online database is undergoing maintenance operations when the data objects would otherwise be inaccessible, the computer system comprising at least one processor communicatively coupled to a memory and in communication with the online database, the online database comprising a view function and a plurality of data objects, the at least one processor configured to:
storing, in the online database, a current switch parameter and the data object, the switch parameter including a first unique identifier of the plurality of unique identifiers of the plurality of instances, the first unique identifier corresponding to a first instance of the data object, the first instance of the data object being the active instance and the other instances of the plurality of instances being the inactive instances;
receive, by the view function associated with a switch parameter, a client query from a requestor, wherein the client query is directed to a data object of the plurality of data objects stored in the online database, the data object comprising a plurality of instances of the data object, each of the plurality of instances (i) identified by a corresponding one of a plurality of unique identifiers and (ii) represented by a database table, wherein the switch parameter is a unique identifier indicative of a status of an instance of a data object of the plurality of data objects stored in the online database, wherein the status includes an active status or an inactive status when the data object of the online database is undergoing a maintenance operation;
modify the received client query, by the view function, based on the switch parameter to create a resultant query defining a plurality of sub-queries each (i) including the switch parameter and (ii) directed to a corresponding one of the plurality of instances, each respective sub-query configured to return results only if the switch parameter matches one of the plurality of unique identifiers associated with the corresponding instance of the data object;
generate resultant data from the online database by executing the resultant query, the resultant data including output from the active instance of the data object and excluding output from the other instances of the plurality of instances of the data object, wherein the other instances are designated as inactive instances, wherein executing the resultant query comprises comparing, by each sub-query, each unique identifier of each corresponding instance of the data object to the switch parameter, and wherein one or more operations are performed on at least one inactive instance of the other instances of the data object while the active instance of the data object provides access to data from the online database storing the plurality of data objects; and
provide the resultant data to the requestor in response to the client query.
8 . The computer system of claim 7 , wherein the at least one processor is further configured:
receive an update command including a second unique identifier of the plurality of unique identifiers, wherein the second unique identifier corresponds to a second instance of the data object; and
update, by the view function, the switch parameter to include the second unique identifier and exclude the first unique identifier, such that the first instance of the data object becomes one of the inactive instances of the data object, and the second instance of the data object becomes the active instance of the data object, wherein the resultant data generated in response to one of the sub-queries matching the second unique identifier of the active instance to the switch parameter.
9 . The computer system of claim 7 , wherein the view function is configured to modify client queries received from a client computing device associated with the requestor to access the active instance.
10 . The computer system of claim 7 , wherein the at least one processor is further configured store, in the online database, the plurality of unique identifiers.
11 . The computer system of claim 7 , wherein the at least one processor is further configured perform at least one of updating, data loading, or maintenance on at least one inactive instance of the inactive instances.
12 . The computer system of claim 7 , wherein the at least one processor is further configured separate the online database into at least two partitions, wherein each of the at least two partitions includes a unique identifier associated with each of the plurality of instances of the data object.
13 . At least one non-transitory computer-readable storage medium for improving accessibility of data objects stored in an online database between computing devices by providing uninterrupted access to the data objects when the online database is undergoing maintenance operations when the data objects would otherwise be inaccessible, the at least one non-transitory computer-readable storage medium having computer-executable instructions embodied thereon, the online database including a view function and a plurality of data objects, wherein, when executed by at least one processor coupled to an online database, the computer-executable instructions cause the at least one processor to:
store, in the online database, the switch parameter and the data object, the switch parameter including a first unique identifier of the plurality of unique identifiers of the plurality of instances, the first unique identifier corresponding to a first instance of the data object, the first instance of the data object being the active instance and the other instances of the plurality of instances being the inactive instances;
receive, by the view function associated with the switch parameter, a client query from a requestor, wherein the client query is directed to a data object of the plurality of data objects stored in the online database, the data object having a plurality of instances stored in the online database storing the data object, each of the plurality of instances of the data object (i) identified by a corresponding one of a plurality of unique identifiers and (ii) represented by a database table, wherein the switch parameter is a unique identifier indicative of a status of an instance of a data object of the plurality of data objects stored in the online database, wherein the status includes an active status or an inactive status when the data object of the online database is undergoing a maintenance operation;
modify the received client query, by the view function, based on the switch parameter to create a resultant query defining a plurality of sub-queries each (i) including the switch parameter and (ii) directed to a corresponding one of the plurality of instances, each respective sub-query configured to return results only if the switch parameter matches one of the plurality of unique identifiers associated with the corresponding instance of the data object;
generate resultant data from the online database by executing the resultant query, the resultant data including output from the active instance of the data object and excluding output from the other instances of the plurality of instances of the data object, wherein the other instances are designated as inactive instances, wherein executing the resultant query includes comparing, by each sub-query, each unique identifier of each corresponding instance of the data object to the switch parameter, and wherein one or more operations are performed on at least one inactive instance of the other instances of the data object while the active instance of the data object provides access to data from the online database storing the plurality of data objects; and
provide the resultant data to the requestor in response to the client query.
14 . The computer-readable storage medium of claim 13 , wherein the view function is configured to modify client queries received from a client computing device associated with the requestor to access the active instance.
15 . The computer-readable storage medium of claim 13 , wherein the computer-executable instructions further cause the at least one processor to store, in the online database, the plurality of unique identifiers.
16 . The computer-readable storage medium of claim 13 , wherein the computer-executable instructions further cause the at least one processor to perform at least one of updating, data loading, or maintenance on at least one inactive instance of the inactive instances.
17 . The computer-readable storage medium of claim 13 , wherein the computer-executable instructions further cause the at least one processor to separate the online database into at least two partitions, wherein each of the at least two partitions includes a unique identifier associated with each of the plurality of instances of the data object.