Positioned updates in a distributed shared-nothing data store
First Claim
Patent Images
1. A method comprising:
- associating each row of a database table distributed among segments of a distributed data store with a respective segment identifier indicating a segment on which the row is stored;
receiving one or more query statements including a declaration of a structured query language cursor and an update statement, the declaration including a select statement for retrieving one or more rows of data from the database table, the select statement including a field name identifying a data field for selection from the one or more rows, the cursor being defined for scrolling the data field of the one or more rows, the update statement including a statement for updating the data field of the one or more rows;
transforming the select statement, including adding a segment identifier data field as a new data field in the select statement;
transforming the update statement, including adding a respective segment identifier to each of the one or more rows of data retrieved by executing the transformed select statement, each segment identifier being retrieved according to the added segment identifier data field; and
dispatching the transformed update statement to the segments.
3 Assignments
0 Petitions
Accused Products
Abstract
Updatable cursors for positioned updates are provided in a distributed shared-nothing data store by associating with each row of data in a result set hidden metadata that identifies the segments and the locations on such segments of such row. When an update is issued to data under a cursor, the associated metadata is transparently inserted into the update statement before it is dispatched to the segments to insure that the correct data is accurately updated. For cached query statements, generic metadata identifiers are used for building and caching, and the actual metadata identifiers are folded into the statement in place of the generic identifiers before dispatch.
18 Citations
20 Claims
-
1. A method comprising:
-
associating each row of a database table distributed among segments of a distributed data store with a respective segment identifier indicating a segment on which the row is stored; receiving one or more query statements including a declaration of a structured query language cursor and an update statement, the declaration including a select statement for retrieving one or more rows of data from the database table, the select statement including a field name identifying a data field for selection from the one or more rows, the cursor being defined for scrolling the data field of the one or more rows, the update statement including a statement for updating the data field of the one or more rows; transforming the select statement, including adding a segment identifier data field as a new data field in the select statement; transforming the update statement, including adding a respective segment identifier to each of the one or more rows of data retrieved by executing the transformed select statement, each segment identifier being retrieved according to the added segment identifier data field; and dispatching the transformed update statement to the segments. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. Computer readable non-transitory media for storing executable instructions for controlling the operation of one or more computers to perform operations comprising:
-
associating each row of a database table distributed among segments of a distributed data store with a respective segment identifier indicating a segment on which the row is stored; receiving one or more query statements including a declaration of a structured query language cursor and an update statement, the declaration including a select statement for retrieving one or more rows of data from the database table, the select statement including a field name identifying a data field for selection from the one or more rows, the cursor being defined for scrolling the data field of the one or more rows, the update statement including a statement for updating the data field of the one or more rows; transforming the select statement, including adding a segment identifier data field as a new data field in the select statement; transforming the update statement, including adding a respective segment identifier to each of the one or more rows of data retrieved by executing the transformed select statement, each segment identifier being retrieved according to the added segment identifier data field; and dispatching the transformed update statement to the segments. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A system comprising:
-
a distributed data store including; a master node comprising one or more processors; and a plurality of segments; and computer-readable non-transitory media storing instructions operable to cause the distributed data store to perform operations comprising; associating each row of a database table distributed among the segments with a respective segment identifier indicating a segment on which the row is stored; receiving one or more query statements including a declaration of a structured query language cursor and an update statement, the declaration including a select statement for retrieving one or more rows of data from the database table, the select statement including a field name identifying a data field for selection from the one or more rows, the cursor being defined for scrolling the data field of the one or more rows, the update statement including a statement for updating the data field of the one or more rows; transforming the select statement, including adding a segment identifier data field as a new data field in the select statement; transforming the update statement, including adding a respective segment identifier to each of the one or more rows of data retrieved by executing the transformed select statement, each segment identifier being retrieved according to the added segment identifier data field; and dispatching the transformed update statement to the segments. - View Dependent Claims (18, 19, 20)
-
Specification