Simulated control of a third-party database

An example method of providing simulated control of a third-party database to a client includes receiving, at a simulation control proxy, a query that selects data from a database table stored in a third-party database. The method also includes submitting, over a network, the query to the third-party database. The method further includes loading a set of database records included in an initial result set of the query. The method also includes determining whether a data storage device includes modification data indicating that the initial result set is stale. The method further includes updating the initial result set in accordance with the modification data if the initial result set is stale. The method also includes sending the updated result set of the query to a client. The updated result set of the query is different from the initial result set of the query.

FIELD OF DISCLOSURE

The present disclosure generally relates to data storage, and more specifically to providing simulated control of a third-party database.

BACKGROUND

Companies may use a variety of methods to store data. For example, a company may have an information technology (IT) department that specializes in this area and purchases servers to store company data along with other IT equipment. Alternatively or additionally, the company may request the services of a third party to store data. The company may opt to store its data, for example, with the help of a cloud storage provider that offers data storage to multiple companies. This option may be cheaper for the company because it does not need to invest in servers and other IT equipment.

The company, however, may run into some disadvantages by using a third party to store data. For example, the third party may not allow the company to modify data in the database. To overcome this problem, the company may copy all of the data from the third party's database to another database, and then modify this other database. This approach, however, is inefficient and time consuming. Moreover, some data storage providers do not allow clients to transfer all of their data out of their domain.

BRIEF SUMMARY

Methods, systems, and techniques for providing simulated control of a third-party database to a client are provided.

According to some embodiments, a method of providing simulated control of a third-party database to a client includes receiving, at a simulation control proxy, a query that selects data from a database table stored in a third-party database. The method also includes submitting, over a network, the query to the third-party database. The method further includes loading a set of database records included in an initial result set of the query. The method also includes determining whether a data storage device includes modification data indicating that the initial result set is stale. The method further includes updating the initial result set in accordance with the modification data if the initial result set is stale. The method also includes sending the updated result set of the query to a client. The updated result set of the query is different from the initial result set of the query.

According to some embodiments, a system for providing simulated control of a third-party database to a client includes a modification module that submits, over a network, a query that selects data from a database table stored in a third-party database and that loads a set of database records included in an initial result set of the query. The system also includes a data federation engine that determines whether a data storage device includes modification data indicating that the initial result set is stale, updates the initial result set in accordance with the modification data if the initial result set is stale, and sends the updated result set of the query to a client. The updated result set of the query is different from the initial result set of the query.

According to another embodiment, a machine-readable medium includes a plurality of machine-readable instructions that when executed by one or more processors is adapted to cause the one or more processors to perform a method including: receiving, at a simulation control proxy, a query that selects data from a database table stored in a third-party database; submitting, over a network, the query to the third-party database; loading a set of database records included in an initial result set of the query; determining whether a data storage device includes modification data indicating that the initial result set is stale; updating the initial result set in accordance with the modification data if the initial result set is stale; and sending the updated result set of the query to a client, the updated result set of the query being different from the initial result set of the query.

DETAILED DESCRIPTION

I. OverviewII. Example System ArchitectureIII. Process a Query

A. Store Modification Data Based on a Modification Query1. Insert Modification Query2. Delete Modification Query3. Update Modification Query

B. Process a Search Query1. Modification Data Storage Device May Store Data Based on Modification Queries2. Initial Result Set is Provided by the Third-Party Database3. Determine Whether the Initial Result Set is Stale4. Update the Initial Result Set if Stalea. Update Initial Result Set Based on an Insert Modification Queryb. Update Initial Result Set Based on a Delete Modification Queryc. Update Initial Result Set Based on an Update Modification QueryIV. Authorization SimulationV. Example MethodVI. Example Computing System
I. Overview

It is to be understood that the following disclosure provides many different embodiments, or examples, for implementing different features of the present disclosure. Some embodiments may be practiced without some or all of these specific details. Specific examples of components, modules, and arrangements are described below to simplify the present disclosure. These are, of course, merely examples and are not intended to be limiting.

The present disclosure provides techniques to enables a company to use a third-party database as if the database were under control of the company. Accordingly, it may be less costly and more efficient than loading data from the third-party database into the company's database and periodically fetching updates.

The present disclosure provides techniques to provide simulated control of a third-party database to a client. For example, techniques are provided that allow an entity to store updates to a third-party database without actually updating the third-party database. Modification queries that are sent by clients are not propagated into the third-party database. Rather, modification data based on the modification queries are stored in a modification data storage device.

According to some embodiments, a method of providing simulated control of a third-party database to a client includes receiving, at a simulation control proxy, a query that selects data from a database table stored in a third-party database. The method also includes submitting, over a network, the query to the third-party database. The method further includes loading a set of database records included in an initial result set of the query. The method also includes determining whether a data storage device includes modification data indicating that the initial result set is stale. The method further includes updating the initial result set in accordance with the modification data if the initial result set is stale. The method also includes sending the updated result set of the query to a client. The updated result set of the query is different from the initial result set of the query.

Unless specifically stated otherwise, as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “determining,” “generating,” “sending,” “receiving,” “submitting,” “loading,” “updating,” “storing,” “creating,” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

II. Example System Architecture

FIG. 1is a block diagram illustrating a system100for providing simulated control of a third-party database to a client, according to some embodiments. System100includes a simulation control proxy102, a third-party database104, and a client106coupled over a network110. Network110may be a private network (e.g., local area network (LAN), wide area network (WAN), intranet, etc.), a public network (e.g., the Internet), or a combination thereof. The network may include various configurations and use various protocols including virtual private networks, wide area networks, local networks, private networks using communication protocols proprietary to one or more companies, cellular and other wireless networks, Internet relay chat channels (IRC), instant messaging, simple mail transfer protocols (SMTP), Ethernet, Wi-Fi and HTTP, and various combinations of the foregoing.

Client106may belong to a company101and request the data storage services of a third party103to store data. Third party103may provide third-party database104to multiple companies, and client106(along with other clients from the same or different company) may consume data from the database. The entity that controls and manages access to third-party database104may be different from the entity to which the data consumer belongs. Client106may interact with third-party database104by sending queries to the database and receiving response sets of the queries from the database. Third party103may not want any one service consumer to have unfettered control of third-party database104because, for example, companies (including client106's company) may store confidential information into third-party database104. As such, third party103may want to prohibit a company from accessing another company's data or from modifying third-party database104.

Third-party database104may have an account107for company101. Account107may store information about company101and which data in third-party database104is company101's data. Simulation control proxy102may include an authentication database109that is associated with account107. Authentication database109will be explained in more detail below.

Third-party database104may be a relational database including one or more database tables. Each table may have one or more table columns and zero or more database records. Each database record may include a primary key (or a primary key set) that uniquely identifies the database record from other database records in the table. Third party103may allow client106to execute queries that select data from tables stored in third-party database104against the database, and retrieve that data. To prevent client106(or any other data consumer) from having unfettered control of third-party database104, third party103may prevent the client from modifying third-party database104. For example, the third party may prevent client106from executing queries that insert data, remove data, or update values stored in third-party database104against the database. Accordingly, client106is unable to modify third-party database104. This may be inconvenient for client106because employees in company101may want to insert data, remove data, and/or update values stored in third-party database104.

Simulation control proxy102may provide simulated control of third-party database104to client106(or any other data consumer that consumes data from third-party database104) such that the client may store updates to third-party database104in a modification data storage device124that are retrieved at a later point in time. Simulation control proxy102includes a modification module120and a data federation engine122coupled to modification data storage device124. Client106may submit a query130to third-party database104, and simulation control proxy102may intercept query130and process it. A query may include an expressions clause (e.g., table columns from which or calculations that a client desires to retrieve), one or more database tables from which to retrieve the data requested by the client, and zero or more conditions clauses (e.g., condition(s) that must be met for a database record to be selected). In an example, a query may be a Structured Query Language (SQL) query of the form “SELECT Column1, Column2, . . . , ColumnX FROM Table1, Table2, . . . , TableY WHERE Condition1, Condition2, . . . , ConditionZ.”

As will be discussed further below, modification module120obtains query130and performs actions on it based on whether query130is a query that selects data from third-party database104or is a query that modifies third-party database104. Modification module120may receive a query and determine whether it is a modification query that modifies third-party database104. For example, a modification query may be an insert command that inserts a set of one or more database records into one or more tables, a delete command that removes a set of one or more database records from one or more tables, or an update command that updates one or more values in a set of one or more database records in one or more tables. To determine whether a query is a modification query, modification module120reads the query. In an example, if a query includes a select command, modification module120may determine that the query is not a modification query. In contrast, if a query includes an insert, delete, or update command, modification module120may determine that the query is a modification query.

III. Process a Query

A. Store Modification Data Based on a Modification Query

1. Insert Modification Query

FIG. 2Aillustrates a process flow200of simulation control proxy102processing an insert modification query that modifies third-party database104, according to some embodiments. InFIG. 2A, third-party database104includes a table “Employees”220, which includes column “Employee ID”222, column “Name”224, and column “Salary”226. Table “Employees”220includes database records232,234,236, and238that store information about the employees in company101. Column “Employee ID”222may be the primary key that uniquely identifies a database record in table “Employees”220. For example, primary key “001” may uniquely identify database record232in table “Employees”220. For brevity and simplicity, third-party database104is shown as including one table. It should be understood, however, that third-party database104may include more than one table, and each table may have zero or more database records.

Modification module120stores updates to third-party database104in modification data storage device124. In some embodiments, modification module120stores modification data in modification data storage device124as an indication that data included in an initial result set provided by third-party database104is stale. The modification data is based on a modification query, and indicates one or more modifications to one or more tables stored in third-party database104. The modifications are based on the modification query, and modification data may be used at a later point in time to determine whether an initial result set provided by third-party database104includes stale data.

InFIG. 2A, modification module120may generate modification data204including a set of database records206based on modification query202. Modification data204indicates that table “Employees”220in third-party database104should include two additional database records. For example, set of database records206includes database records216and218, which client106is requesting to be added to third-party database104because “Cathy G.” and “Harry P.” are two new employee hires at company101.

Rather than execute modification query202at third-party database104, modification module120may generate set of database records206based on modification query202, and store set of database records206into modification data storage device124with an indication that set of database records206should be inserted into table “Employees”220. Modification query202includes the name(s) of the table(s) modified in third-party database104. In particular, modification query202includes “Employees,” the table name into which set of database records206should be inserted. Modification data204and set of database records206correspond to table “Employees”220because the modification data includes data that updates this table.

2. Delete Modification Query

In the example illustrated inFIG. 2A, modification query202is an insert modification query including a command to insert a set of database records into table “Employees”220. In other examples, a modification query may be a delete modification query that removes a set of database records from third-party database104or may be an update modification query that updates one or more values in third-party database104.

FIG. 2Billustrates a process flow300of simulation control proxy102processing a delete modification query and an update modification query that modify third-party database104, according to some embodiments. InFIG. 2B, client106sends a modification query302, which is a delete modification query including a command that removes a set of database records from table “Employees”220. In particular, modification query302includes “DELETE FROM Employees WHERE Name=‘David F.’ OR Name=‘Mark N.’ OR Name=‘Harry P.’”

InFIG. 2B, modification module120may generate modification data304including a set of database records306based on modification query302. Modification data304indicates that three database records should be removed from table “Employees”220in third-party database104. Set of database records306includes database records316,317, and318, which client106is requesting to be removed from third-party database104because “David F.”, “John A.”, and “Harry P.” are no longer employed at company101.

Rather than execute modification query302at third-party database104, modification module120may generate set of database records306based on modification query302, and store set of database records306into modification data storage device124with an indication that database records stored in third-party database104and that correspond to set of database records306should be removed from table “Employees”220. Modification query302includes the name(s) of the table(s) that is modified in third-party database104. In particular, modification query302includes “Employees,” the table name from which a set of database records should be removed. Modification data304and set of database records306correspond to table “Employees”220because the modification data includes data that updates this table.

3. Update Modification Query

Additionally, inFIG. 2B, a client346belonging to company101sends a modification query352, which is an update modification query including a command that updates one or more values in a set of database records in table “Employees”220. In particular, modification query352includes “UPDATE Employees SET Salary=65500 WHERE Name=‘Mark N.’”

InFIG. 2B, modification module120may generate modification data354including a set of database records356based on modification query352. Modification data354indicates that the value of the Salary column in database records that are stored in table “Employees”220and that correspond to set of database records356should be updated. For example, set of database records356includes a database record366, which includes the employee name “Mark N.” and the salary value of “65500.” Database record366includes data that updates database record238in third-party database104because, for example, Mark N. received a raise.

Rather than execute modification query352at third-party database104, modification module120may generate set of database records356based on modification query352, and store set of database records356into modification data storage device124. Modification query352includes the name(s) of the table(s) that is modified in third-party database104. In particular, modification query352includes “Employees,” the table name from which a set of database records that is included in third-party database104and that corresponds to set of database records366should be updated. Modification data354and set of database records356correspond to table “Employees”220because the modification data includes data that updates this table. Additionally, database record366corresponds to database record238because database record366includes data that updates the value in column “Salary”226of database record238to the value “65500.”

B. Process a Search Query

A modification query is not executed at third-party database104and thus this database may or may not store the most up-to-date data. For example, if a client submits a search query selecting data from table “Employees”220, third-party database104returns an initial result set that may or may not include the most up-to-date data. Rather, as discussed above, sets of database records206,306, and356(seeFIGS. 2 and 3) are stored in modification data storage device124, and their corresponding modification queries are not executed at third-party database104. Accordingly, third-party database104may receive a search query and return an initial result set that is stale and does not include the most up-to-date data (e.g., data based on sets of database records206,306, and/or356).

In some embodiments, data federation engine122may interact with third-party database104and modification data storage device124to obtain the most up-to-date result set of a search query, and may submit the updated result set to the requesting client in lieu of the initial result set returned by third-party database104.FIG. 3illustrates a process flow400of simulation control proxy102processing a search query that selects data from third-party database104, according to some embodiments. A search query selects data from one or more database records in one or more tables stored in third-party database104.

1. Modification Data Storage Device May Store Data Based on Modification Queries

InFIG. 3, modification data storage device124includes “insert” modification data204, which is based on an insert modification query (e.g., modification query202) and includes an indication that set of database records206is to be inserted into table “Employees”220(seeFIG. 2A). Modification module120may store modification data204with a timestamp450indicating the date and time at which modification query202corresponding to modification data204was received.

Additionally, modification data storage device124includes “delete” modification data304, which is based on a delete modification query (e.g., modification query302) and includes an indication that a set of database records stored in third-party database104and that corresponds to set of database records306is to be removed from table “Employees”220(seeFIG. 2B). Modification module120may store modification data304with a timestamp452indicating the date and time at which modification query302corresponding to modification data304was received.

Additionally, modification data storage device124includes “update” modification data354, which is based on an update modification query (e.g., modification query352) and includes an indication that a set of database records stored in third-party database104and that corresponds to set of database records356is to be updated in table “Employees”220(seeFIG. 2B). Modification module120may store modification data354with a timestamp454indicating the date and time at which modification query352corresponding to modification data354was received.

InFIG. 3, client346sends a search query402to third-party database104for execution, and modification module120may intercept search query402before it reaches third-party database104. In another example, client346sends search query402to simulation control proxy102. Search query402includes a command that selects one or more values from column “Name”224in the Employees table, where the value in column “Salary”226is greater than 65000. In other words, search query402is a search for employees who earn more than $65,000. Search query402includes the name of the table from which data is selected along with the conditions for selecting database records in the table. Search query402includes “SELECT Name FROM Employees WHERE Salary>65000.”

2. Initial Result Set is Provided by the Third-Party Database

Modification module120may submit, over a network, search query402to third-party database104. Third-party database104may receive search query402and execute it against one or more database tables in the database. Third-party database104may retrieve an initial result set410, which is a result set of search query402. Initial result set410includes data from one or more database records in one or more database tables stored in third-party database104. InFIG. 3, initial result set410includes the name of the table from which data is selected based on search query402(e.g., table “Employees”220) and also includes a set of database records406including database records422and424. Initial result set410corresponds to a table stored in third-party database104if initial result set410includes data selected from that table. For example, initial result set410corresponds to table “Employees”220because database records422and424include data selected from table “Employees”220. Additionally, the database records included in initial result set410also correspond to table “Employees”220.

In some examples, a first database record included in initial result set410corresponds to a second database record stored in third-party database104if the first database record includes data selected from the second database record. In some examples, a first database record included in initial result set410corresponds to a second database record stored in third-party database104if a primary key in the first database record matches a primary key in the second database record. InFIG. 3, database record422includes the primary key “001” and the employee name “John A.” Database record422corresponds to database record232because database record422includes data selected from database record232. Additionally, the primary key “001” in database record422matches the primary key “001” in database record232. Similarly, database record424includes the primary key “002” and the employee name “Cheryl D.” Database record424corresponds to database record234because database record424includes data selected from database record234. Additionally, the primary key “002” in database record424matches the primary key “002” in database record234.

Third-party database104sends initial result set410to simulation control proxy102. In the example illustrated inFIG. 3, initial result set410includes the primary keys in the selected database records. In another example, initial result set410does not include the primary keys in the selected database records. In this example, data federation engine122may obtain the primary keys of database records by querying third-party database104for them. Data federation engine122obtains initial result set410, loads the set of database records included in initial result set410into a memory coupled to simulation control proxy102, and reads the data included in initial result set410from the memory.

3. Determine Whether the Initial Result Set is Stale

In some embodiments, data federation engine122determines whether modification data storage device124includes modification data indicating that initial result set410is stale. Modification data may indicate that initial result set410is stale if the modification data includes data that updates initial result set410. Data federation engine122sends initial result set410to client346if the modification data stored in modification data storage device124does not indicate that initial result set410is stale. In contrast, data federation engine122updates initial result set410in accordance with the modification data if initial result set410is stale, and sends the updated result set to client346in lieu of initial result set410of search query402.

In some examples, to determine whether initial result set410is stale, data federation engine122determines whether initial result set410and modification data (e.g., modification data204,304, or354) stored in modification data storage device124correspond to the same table. Data federation engine122may identify the table corresponding to initial result set410and search modification data storage device124for data corresponding to the table (e.g., table “Employees”220). If initial result set410and the modification data correspond to the same table, data federation engine122may determine whether to update initial result set410based on the modification data.

InFIG. 3, “insert” modification data204, “delete” modification data304, and “update” modification data354correspond to table “Employees”220because modification data204,304, and354include data that updates table “Employees”220. Additionally, initial result set410corresponds to table “Employees”220because initial result set410includes data selected from table “Employees”220. Accordingly, modification data204and initial result set410correspond to the same table. Additionally, each of “insert” modification data204, “delete” modification data304, and “update” modification data354updates table “Employees”220.

4. Update the Initial Result Set if Stale

In some embodiments, data federation engine122updates initial result set410in accordance with the modification data if the initial result set is stale. The updated result set is based on initial result set410and the relevant modification data stored in modification data storage device124. Data federation engine122may read the timestamps of the relevant modification data and process them in chronological order. In an example, timestamp450is before timestamp452, which is before timestamp454. In this example, data federation engine122may first process modification data204, then modification data304, and lastly modification data354.FIGS. 1-4, 5A, and 5Bare discussed together to better explain how data federation engine122may process a search query.

a. Update Initial Result Set Based on an Insert Modification Query

Modification data204is based on modification query202, which is an insert modification query including a command to insert set of database records206into table “Employees”220(seeFIG. 2A). If the modification data indicating that initial result set410is stale is based on an insert modification query, data federation engine122may update initial result set410by adding data from set of database records206to initial result set410, where the added data satisfies search query402. For example, data federation engine122may update initial result set410by adding one or more database records to initial result set410.

InFIGS. 2 and 4, modification data204indicates that two database records are to be added to table “Employees”220, and includes data that satisfies search query402. InFIG. 2A, database record218satisfies search query402because “Harry P.” is an employee who earns more than $65,000. Thus, modification data204includes data that updates initial result set410because “Harry P.” should be added to initial result set410. Data federation engine122retrieves the data from set of database records206satisfying search query402, and merges the data (“Harry P.”) from set of database records206with initial result set410to create an updated result set, which may also be referred to as an intermediate result set because it may be further modified based on modification data304and/or modification data354.

FIG. 4Aillustrates an example intermediate result set512that is created based on merging initial result set410with the data included in modification data204that satisfies search query402, according to some embodiments. Intermediate result set512is based on initial result set410and modification data204, and includes three database records. The three database records include database records422and424(from initial result set410), and an added database record522including the employee name “Harry P,” who earns over $65,000 per year. Database record522corresponds to database record218, which includes the primary key “006” and the employee name “Harry P.”, because database records522and218have the same value in their corresponding Name column. Intermediate result set512is different from initial result set410, which was provided by third-party database104. Accordingly, it may be unnecessary to execute modification query202at third-party database104in order to retrieve data from the set of newly inserted database records.

b. Update Initial Result Set Based on a Delete Modification Query

Intermediate result set512based on modification query202may be referred to as the current result set or intermediate result set, and may be further modified by data federation engine122to determine the most up-to-date result set to return to client346. Modification data304is based on modification query302, which is a delete modification query including a command to remove a set of database records from table “Employees”220(seeFIG. 2B). Intermediate result set512is stale if modification data304, which is based on a delete modification query, indicates that a database record is to be removed from the intermediate result set. If the modification data indicating that intermediate result set512is stale is based on a delete modification query, data federation engine122may update result set512by removing one or more database records from intermediate result set512, where the removed database records match a database record of set of database records306.

InFIGS. 3 and 4, modification data304indicates that three database records are to be removed from table “Employees”220. A first database record included in a result set matches a second database record included in modification data304if a column value in the first database record matches the corresponding column value in the second database record. For example, database record422of intermediate result set512matches database record317included in modification data304because both database records have the value “John A.” in their Name columns and correspond to the same table. Similarly, database record522of intermediate result set512matches database record318included in modification data304because both database records have the value “Harry P.” in their Name columns and correspond to the same table. Data federation engine122retrieves the data from modification data304and merges the data with intermediate result set512to create an updated result set, which may also be referred to as an intermediate result set because it may be further modified based on modification data354.

FIG. 4Billustrates an example intermediate result set514that is created based on merging intermediate result set512with the data included in modification data304, according to some embodiments. Data federation engine122updates intermediate result set512by removing database records422and522from the intermediate result set. Intermediate result set514is based on initial result set410, modification data204, and modification data304, and includes a single database record424including the employee name, “Cheryl D.” Intermediate result set514does not include database records422or522because their corresponding database records in table “Employees”220should be removed based on modification query302. Intermediate result set514is different from initial result set410, which was provided by third-party database104. Accordingly, it may be unnecessary to execute modification query302at third-party database104in order to determine which database records to remove from an intermediate result set (or from initial result set410).

c. Update Initial Result Set Based on an Update Modification Query

Modification data354is based on modification query352, which is an update modification query including a command to update one or more values in a set of database records in table “Employees”220(seeFIG. 2B). Intermediate result set514is stale if modification data354, which is based on an update modification query, indicates that the intermediate result set is to be updated. Initial result set410is stale if modification data354indicates that one or more values in one or more database records in the current result set (or initial result set410if modification query352is the first query processed) is to be updated.

In some examples, if the modification data indicating that intermediate result set514is stale is based on an update modification query, data federation engine122may update result set514by replacing one or more values in the intermediate result set with one or more values based on the modification data. For example, if modification data354indicates that employee “Cheryl D.” recently changed her last name and is now “Cheryl G., data federation engine122may replace “Cheryl D.” in database record424with “Cheryl G.” In this example, the updated result set includes one database record including “Cheryl G.”, and this database record is sent to client346.

In some embodiments, data federation engine122searches modification data storage device124based on the primary keys included in initial result set410. If data federation engine122determines that a first database record included in initial result set410has the same primary key as associated data in modification data storage device124, data federation engine122may replace the value in the first database record with a value based on the associated data.

In some examples, if the modification data indicating that intermediate result set514is stale is based on an update modification query, data federation engine122may update result set514by removing one or more database records from intermediate result set514, where the removed database records no longer satisfy the search query. For example, if modification data354indicates that the salary of employee “Cheryl D.” was reduced to $59,000 and requested this salary update in table “Employees”220, data federation engine122may remove database record424from intermediate result set514because “Cheryl D.” no longer earns over $65,000 and thus does not satisfy search query402. In this example, the updated result set is an empty set, and data federation engine122may notify client346that no employees satisfy the search criterion.

In some examples, if the modification data indicating that intermediate result set514is stale is based on an update modification query, data federation engine122may update result set514by adding data based on the modification data to intermediate result set514, where the added data satisfies search query402. In the example illustrated inFIG. 2A, modification data354indicates that the salary of employee “Mark N.” was increased to $65,500 and requested this salary update in table “Employees”220. Data federation engine122may add a database record434to intermediate result set514because “Mark N.” earns over $65,000 and thus satisfies search query402. Data federation engine122may create updated result set412based on search query402, modification data204, modification data304, and modification data354. Updated result set412includes database records434and424, and is different from initial result set410, which was provided by third-party database104. Updated result set412is the correct result set of search query402. Accordingly, it may be unnecessary to execute modification query354at third-party database104in order to retrieve updated data. Data federation engine122may send updated result set412to client346in lieu of initial result set410.

It should be understood that modification data that corresponds to the same table as initial result set410may or may not update initial result set410. The determination of whether initial result set410is stale may be based on the search query and what data is requested.

As discussed above and further emphasized here,FIGS. 1-4, 5A, and 5Bare merely examples, which should not unduly limit the scope of the claims. For example, it should be understood that one or more modules or components inFIG. 1(e.g., modification module120and data federation engine122) may be combined with another module or component. It should also be understood that one or more modules or components inFIG. 1may be separated into more than one module or component.

Additionally, although the term “intermediate result set” is used, it should be understood that the initial result set provided by third-party database104may instead be updated if the associated modification data is processed first. For example, modification data304inFIG. 3may update initial result set410(rather than an intermediate result set) if modification data304is processed before modification data204and modification data354. In another example, modification data354inFIG. 3may update initial result set410(rather than an intermediate result set) if modification data354is processed before modification data204and modification data304.

Further, inFIGS. 2 and 3, modification module120generates modification data including a set of database records. In this example, modification module120creates the set of database records and stores the set into modification data storage device124. In some examples, modification data may include data different from or in addition to the set of database records. In an example, modification data204includes the modification query, and modification module120stores the modification query into modification data storage device124. In this example, data federation engine122may update initial result set410by identifying the relevant data, which is the modification query, in modification data storage device124, and creating a set of database records based on the stored modification query.

For example, in reference toFIG. 2A, modification module120may store modification query202into modification data storage device124. In response to search query402inFIG. 3, data federation engine122may receive initial result set410, identify modification query202stored in modification data storage device124as corresponding to the same table as initial result set410, and create set of database records206. Data federation engine122may retrieve the data that satisfies search query402and update initial result set410in accordance with the retrieved data.

Additionally, to reduce the time it takes to process a search query, data federation engine122may periodically condense the data in modification data storage device124based on overlapping data. For example, if simulation control proxy102receives a modification query that updates database record236in third-party database104and then deletes database record236, modification module120may store modification data based on the update modification query and the delete modification query. Data federation engine122may identify this overlapping modification data and remove the modification data based on the update. Additionally, if simulation control proxy102receives a first modification query that updates a value in database record236and then receives a second modification query that updates the value in database record236, data federation engine122may remove the modification data associated with the first modification query, thus eliminating actions taken to arrive at the final result set that is returned to the client.

Referring back toFIG. 1, simulation control proxy102includes an authentication database109that stores one or more user credentials associated with account107in third-party database104. Simulation control proxy102may store user credentials of employees belonging to company101in authentication database109. Simulation control proxy102may authenticate users based on their user credentials.

Third-party database104may have one account (e.g., account107) for company101. Account107may be associated with company101's data stored in third-party database104. Third-party database104may store confidential information that company101does not want accessible to all of its employees, and so may not want to provide all of its employees with unfettered access to the data in third-party database104. If an employee at company101wants to load from or modify data stored in third-party database104, the employee may provide her own user credentials and simulation control proxy102may authenticate them with the data stored in authentication database109. Additionally, simulation control proxy102may determine whether client106is authorized perform the action associated with query130. In this way, simulation control proxy102may ensure that the user requesting particular information or requesting that data in third-party database104be modified has the authority to perform that action.

In some embodiments, simulation control proxy102map account107stored in third-party database104to a plurality of user credentials stored in authentication database109. The plurality of user credentials may be used by different employees belonging to company101. Account107may be authenticated based on first user credentials. Simulation control proxy102may authenticate second user credentials provided by client106and may also determine whether client106is authorized to submit query130to third-party database104. Simulation control proxy102may determine which employees are authorized to perform which operations (e.g., execute search queries, insert modification queries, delete modification queries, or update modification queries) based on their user credentials. If client106is authorized to retrieve data from table “Employees”220, and query130is a select query that retrieves data from table “Employees”220, then simulation control proxy102may provide the appropriate credentials to third-party database104so that it returns an initial result set of query130. In another example, if client106is not authorized to modify table “Employees”220, and query130is a modification query that modifies table “Employees”220, then simulation control proxy102may provide a response back to client106that the request failed. In another example, if client106is only authorized to retrieve data from table “Employees”220and no other tables in third-party database104, and query130is a select query that retrieves data from a table other than table “Employees”220, then simulation control proxy102may provide a response back to client106that the request failed.

Simulation control proxy102may provide the first user credentials and query130to third-party database104if client106is authenticated and authorized to submit query130to third-party database104. Accordingly, simulation control proxy102may provide client106with simulated control over the “management of accounts” for third-party database104. For example, if client106has the authority to delete accounts from authentication database109, client109may want to delete those accounts associated with employees no longer with company101. In this example, client106may send a request to simulation control proxy102to remove or void particular accounts or user credentials stored in authentication database109associated with those employees no longer with company101. Accordingly, if a former employee attempts to access third-party database104with her old user credentials, simulation control proxy102may return a response to the former employee that her request was unsuccessful.

V. Example Method

FIG. 5is a flowchart illustrating a method500of providing simulated control of a third-party database to a client, according to some embodiments. Method500is not meant to be limiting and may be used in other applications

InFIG. 5, method500includes blocks502-512. In a block502, a query that selects data from a database table stored in a third-party database is received. In an example, simulation control proxy102receives search query402that selects data from table “Employees”220stored in third-party database104. In a block504, the query is submitted over a network to the third-party database. In an example, simulation control proxy102submits, over network110, search query402to third-party database104.

In a block506, a set of database records included in an initial result set of the query is loaded into a memory coupled to simulation control proxy102. In an example, simulation control proxy102loads set of database records406included in initial result set410of query130into a memory coupled to simulation control proxy102. In a block508, it is determined whether a data storage device includes modification data indicating that the initial result set is stale. In an example, data federation engine122determines whether modification data storage device124includes modification data204indicating that initial result set410is stale.

In a block510, the initial result set is updated in accordance with the modification data if the initial result set is stale. In an example, data federation engine122updates initial result set410in accordance with modification data204if initial result set410is stale. In a block512, the updated result set of the query is sent to a client, the updated result set of the query being different from the initial result set of the query. In an example, simulation control proxy102sends updated result set412of query130to a client, updated result set412of query130being different from initial result set410of query130.

In some embodiments, one or more actions illustrated in blocks502-512may be performed for any number of queries received by simulation control proxy102. Additionally, it is also understood that additional processes may be inserted before, during, or after blocks502-512discussed above. It is also understood that one or more of the blocks of method500described herein may be omitted, combined, or performed in a different sequence as desired.

VI. Example Computing System

FIG. 6is a block diagram of a computer system600suitable for implementing one or more embodiments of the present disclosure. Each of modification module120and data federation engine122may execute on a computing device. The computing device may include one or more storage devices each selected from a group including a floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, RAM, PROM, EPROM, FLASH-EPROM, any other memory chip or cartridge, and/or any other medium from which a processor or computer is adapted to read. The one or more storage devices may include stored information that may be made available to one or more computing devices and/or computer programs (e.g., clients) coupled to the application server using a computer network (not shown). The computer network may be any type of network including a LAN, a WAN, an intranet, the Internet, a cloud, and/or any combination of networks thereof that is capable of interconnecting computing devices and/or computer programs in the system.

Computer system600includes a bus602or other communication mechanism for communicating information data, signals, and information between various components of computer system600. In an example, modification module120and data federation engine122may communicate using bus602. A processor612, which may be a micro-controller, digital signal processor (DSP), or other processing component, processes these various signals, such as for display on computer system600or transmission to other devices via communications link608. Components of computer system600also include a system memory component634(e.g., RAM), a static storage component616(e.g., ROM), and/or a disk drive617. Computer system600performs specific operations by processor612and other components by executing one or more sequences of instructions contained in system memory component634.

Components include an input/output (I/O) component604that processes a user action, such as selecting keys from a keypad/keyboard, selecting one or more buttons or links, etc., and sends a corresponding signal to bus602. I/O component404may include an output component such as a display611, and an input control such as a cursor control613(such as a keyboard, keypad, mouse, etc.). An optional audio I/O component605may also be included to allow a user to use voice for inputting information by converting audio signals into information signals. Audio I/O component605may allow the user to hear audio. A transceiver or network interface606transmits and receives signals between computer system600and other devices via a communications link608to a network. In an embodiment, the transmission is wireless, although other transmission mediums and methods may also be suitable.

Logic may be encoded in a computer readable medium617, which may refer to any medium that participates in providing instructions to processor612for execution. Such a medium may take many forms, including but not limited to, non-volatile media, volatile media, and transmission media. In various implementations, non-volatile media includes optical, or magnetic disks, or solid-state drives, volatile media includes dynamic memory, such as system memory component634, and transmission media includes coaxial cables, copper wire, and fiber optics, including wires that include bus602. In an embodiment, the logic is encoded in non-transitory computer readable medium. Transmission media may take the form of acoustic or light waves, such as those generated during radio wave, optical, and infrared data communications.

Some common forms of computer readable media include, for example, floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, punch cards, paper tape, any other physical medium with patterns of holes, RAM, PROM, EEPROM, FLASH-EEPROM, any other memory chip or cartridge, or any other medium from which a computer is adapted to read. In various embodiments of the present disclosure, execution of instruction sequences (e.g., method500) to practice the present disclosure may be performed by computer system600. In various other embodiments of the present disclosure, a plurality of computer systems600coupled by communications link608to the network (e.g., such as a LAN, WLAN, PTSN, and/or various other wired or wireless networks, including telecommunications, mobile, and cellular phone networks) may perform instruction sequences to practice the present disclosure in coordination with one another.

Where applicable, various embodiments provided by the present disclosure may be implemented using hardware, software, or combinations of hardware and software. Also where applicable, the various hardware components and/or software components set forth herein may be combined into composite components including software, hardware, and/or both without departing from the spirit of the present disclosure. Where applicable, the various hardware components and/or software components set forth herein may be separated into sub-components including software, hardware, or both without departing from the spirit of the present disclosure. In addition, where applicable, it is contemplated that software components may be implemented as hardware components, and vice-versa.

Application software in accordance with the present disclosure may be stored on one or more computer readable media. It is also contemplated that the application software identified herein may be implemented using one or more general purpose or specific purpose computers and/or computer systems, networked and/or otherwise. Where applicable, the ordering of various blocks described herein may be changed, combined into composite blocks, and/or separated into sub-blocks to provide features described herein.

The foregoing disclosure is not intended to limit the present disclosure to the precise forms or particular fields of use disclosed. As such, it is contemplated that various alternate embodiments and/or modifications to the present disclosure, whether explicitly described or implied herein, are possible in light of the disclosure. Changes may be made in form and detail without departing from the scope of the present disclosure. Thus, the scope of the disclosure should be limited only by the following claims, and it is appropriate that the claims be construed broadly and in a manner consistent with the scope of the embodiments disclosed herein.