System and method for performing database operations on a continuous stream of tuples
First Claim
1. A method of processing a stream of data in a database management system, in accordance with a specified query, comprising:
- using a scan operator, scanning a defined range of rows in a database table in accordance with the specified query, and returning qualifying rows in the defined range to a calling application;
using the scan operator, suspending operation of the scanning step when there are no qualifying rows in the defined range; and
automatically resuming operation of the scanning step when one or more qualifying rows in the defined range are added to the database table.
3 Assignments
0 Petitions
Accused Products
Abstract
The SQL compiler and SQL executor in a database management system are extended to process queries requiring streaming mode processing of data stored in a table. A scan operator performs table access functions during execution of the streaming mode query. The scan operator first performs an initial scan to access rows in a specified database table, and then performs a delta scan to access new rows added to the table, as well as rows modified by other queries. The scan operator continues to process new data added to the table until the initiating user or application closes the associated cursor. A set of data structures are provided to keep track of active scan operators, including a session control block that includes fields for keeping track of whether the scan operator is performing an initial scan or a delta scan. The session control block also includes, for streaming mode scan operators, a delta scan list of new and modified rows to be processed in the delta scan. When a transaction terminates, any streaming mode scan operators whose operation was suspended because of rows locked by the transaction are automatically rescheduled for execution.
157 Citations
29 Claims
-
1. A method of processing a stream of data in a database management system, in accordance with a specified query, comprising:
-
using a scan operator, scanning a defined range of rows in a database table in accordance with the specified query, and returning qualifying rows in the defined range to a calling application;
using the scan operator, suspending operation of the scanning step when there are no qualifying rows in the defined range; and
automatically resuming operation of the scanning step when one or more qualifying rows in the defined range are added to the database table. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method of processing a stream of data in a database management system, in accordance with a specified query, comprising:
-
using a scan operator, performing an initial scan to access a defined range of rows in the database table;
while performing the initial scan, building a list of rows that become available during the initial scan and that fall within the defined range of rows in the database table;
using the scan operator, performing a secondary scan to access rows included in the list;
while performing the secondary scan, adding to the list rows that become available after the initial scan and that fall within the defined range of rows in the database table; and
processing the accessed rows in accordance with the specified query. - View Dependent Claims (8, 9)
-
-
10. A database management system, comprising:
-
a database, including a plurality of tables, each table storing data in one or more rows;
an execution engine for executing a streaming mode query, for processing a stream of data, the execution engine including a scan operator for accessing a defined range of rows in a specified one of the database tables;
the scan operator including;
initial scan instructions for performing an initial scan to access the defined range of rows in the specified table;
a list data structure for storing a list of references to rows, if any, in the specified table that become available during the initial scan and that fall within the defined range of rows in the specified table; and
secondary scan instructions for performing a secondary scan to access rows referenced in the list data structure. - View Dependent Claims (11, 12, 13, 15, 16, 17, 19, 20, 21)
-
-
14. A computer program product for use in conjunction with a computer system, the computer system including a database, including a plurality of tables, each table storing data in one or more rows;
- the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising;
an execution engine for executing a streaming mode query, for processing a stream of data, the execution engine including a scan operator for accessing a defined range of rows in a specified one of the database tables;
the scan operator including;
initial scan instructions for performing an initial scan to access the defined range of rows in the specified table;
a list data structure for storing a list of references to rows, if any, in the specified table that become available during the initial scan and that fall within the defined range of rows in the specified table; and
secondary scan instructions for performing a secondary scan to access rows referenced in the list data structure.
- the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising;
-
18. A method of processing a stream of data in a database management system, in accordance with a specified query, comprising:
-
using a scan operator, scanning a defined range of rows in a database table in accordance with the specified query, and returning qualifying rows in the defined range to a calling application;
using the scan operator, suspending operation of the scanning step when there are no qualifying rows in the defined range; and
automatically resuming operation of the scanning step after one or more qualifying rows in the defined range in the database table become available.
-
-
22. A database management system, comprising:
-
a database, including a plurality of tables, each table storing data in one or more rows;
an execution engine for executing a streaming mode query, for processing a stream of data, the execution engine including a scan operator for accessing a defined range of rows in a specified one of the database tables;
the scan operator including;
instructions for scanning a defined range of rows in a database table in accordance with the specified query, and returning qualifying rows in the defined range to a calling application; and
instructions for suspending operation of the scan operator when there are no qualifying rows in the defined range; and
the execution engine including instructions for automatically resuming operation of the scan operator after one or more qualifying rows in the defined range become available in the database table. - View Dependent Claims (23, 24, 25, 27, 28, 29)
-
-
26. A computer program product for use in conjunction with a computer system, the computer system including a database, including a plurality of tables, each table storing data in one or more rows;
- the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising;
an execution engine for executing a streaming mode query, for processing a stream of data, the execution engine including a scan operator for accessing a defined range of rows in a specified one of the database tables;
the scan operator including;
instructions for scanning a defined range of rows in a database table in accordance with the specified query, and returning qualifying rows in the defined range to a calling application; and
instructions for suspending operation of the scan operator when there are no qualifying rows in the defined range; and
the execution engine including instructions for automatically resuming operation of the scan operator after one or more qualifying rows in the defined range become available in the database table.
- the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising;
Specification