Obtaining incremental updates from a database using a partial query
AssigneeRed Hat, Inc.
InventorsFilip Elias, Filip Nguyen
Life of this patent
Estimating the term…
Abstract
An example method of processing a query includes receiving a partial query including an identifier that identifies a full query corresponding to the partial query. The partial query is sent from a client and includes a command to select data from a database table stored in a database. The method also includes determining whether the table has been updated since a previous result set was sent to the client. The method further includes generating a partial result set including an indication of the updates to the table since the previous result set was sent to the client. The method also includes sending the partial result set to the client. The partial result set is an incomplete result set of the partial query.
Claims14
A method of processing a query, comprising:
- receiving, at a database server, a full query including a command to select from a set of database tables one or more records satisfying a set of conditions, the full query being sent from a web service, and the set of database tables being stored in a database;
- modifying the set of database tables in response to receiving a set of modification queries, the modifying including at least one of inserting one or more records into the set of database tables or removing one or more records from the set of database tables;
- updating modification data stored in a data storage device different from the database, wherein the updating includes storing an indication of data inserted into or removed from one or more columns of the set of database tables in accordance with the set of modification queries;
- receiving, at the database server, a partial query including an identifier that identifies the full query, the partial query being sent from the web service and including the command;
- determining, based on the modification data, whether the set of database tables has been updated since a previous result set was sent to the web service;
- generating a partial result set including an indication of the updates to the set of database tables since the previous result set was sent to the web service;
- sending the partial result set to the web service, the partial result set being an incomplete result set of the partial query;
- and
- after sending the partial result set to the web service, removing the indication from the modification data;
- wherein the partial query includes a condition, and wherein generating the partial result set includes:
- identifying primary key data of a column of the one or more columns, the primary key data being stored in the modification data;
- generating a first query by replacing the condition in the partial query with a condition specifying records matching the primary key data;
- and
- executing the first query against the database, wherein the partial result set is a result set of the first query.
A system for processing a query, comprising:
- a non-transitory memory;
- and
- one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the system to perform operations comprising:
- receiving, at a database server, a full query including a command to select from a set of database tables one or more records satisfying a set of conditions, the full query being sent from a web service, and the set of database tables being stored in a database;
- modifying the set of database tables in response to receiving a set of modification queries, the modifying including at least one of inserting one or more records into the set of database tables or removing one or more records from the set of database tables;
- updating modification data stored in a data storage device different from the database, wherein the updating includes storing a first indication of the modified set of database tables and a second indication of data inserted into or removed from one or more columns of the set of database tables in accordance with the set of modification queries;
- receiving, at the database server, a partial query including an identifier that identifies the full query, the partial query being sent from the web service and including the command;
- determining, based on the modification data, whether the set of database tables has been updated since a previous result set was sent to the web service;
- generating a partial result set including an indication of the updates to the set of database tables since the previous result set was sent to the web service;
- sending the partial result set to the web service, the partial result set being an incomplete result set of the partial query;
- after sending the partial result set to the web service, removing the indication from the modification data;
- identifying primary key data of a column of the one or more columns, the primary key data being stored in the modification data;
- generating a first query by replacing the condition in the partial query with a condition specifying records matching the primary key data;
- and
- executing the first query against the database, wherein the partial result set is a result set of the first query.
A non-transitory machine-readable medium comprising 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 comprising:
- receiving, at a database server, a full query including a command to select from a set of database tables one or more records satisfying a set of conditions, the full query being sent from a web service, and the set of database tables being stored in a database;
- modifying the set of database tables in response to receiving a set of modification queries, the modifying including at least one of inserting one or more records into the set of database tables or removing one or more records from the set of database tables;
- updating modification data stored in a data storage device different from the database, wherein the updating includes storing an indication of data inserted into or removed from one or more columns of the set of database tables in accordance with the set of modification queries;
- receiving, at the database server, a partial query including an identifier that identifies the full query, the partial query being sent from the web service a client and including the command;
- determining, based on the modification data, whether the set of database tables has been updated since a previous result set was sent to the web service;
- generating a partial result set including an indication of the updates to the set of database tables since the previous result set was sent to the web service;
- sending the partial result set to the web service, the partial result set being an incomplete result set of the partial query;
- after sending the partial result set to the web service, removing the indication from the modification data;
- identifying primary key data of a column of the one or more columns, the primary key data being stored in the modification data;
- generating a first query by replacing the condition in the partial query with a condition specifying records matching the primary key data;
- and
- executing the first query against the database, wherein the partial result set is a result set of the first query.
Dependencies are inferred from the claim text.