# US 8,751,460 B1 · Smart distributed transactions and multiply distributed tables

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,751,460 B1
- Document ID: US8751460B1
- Status: Granted
- Kind: B1
- Application number: 14/044,268
- Filed: 2013-10-02
- Granted: 2014-06-10
- Earliest claimed: 2013-01-29
- Assignees: Tesora, Inc.
- Applicants: ParElastic Corporation
- Inventors: Mrithyunjaya Annapragada; Morgan Jones
- Web page: https://patentgrep.com/patent/US8751460B1

## CPC

- G06F 16/90335: {Query processing}
- G06F 16/21: Design, administration or maintenance of databases
- G06F 16/24542: {Plan optimisation}
- G06F 16/24544: {Join order optimisation}
- G06F 16/2471: {Distributed queries}
- G06F 16/284: {Relational databases}
- G06F 16/951: Indexing; Web crawling techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An elastic parallel database system where metadata is specified out-of-band during database operations via a set of augmentation rules. The rules are used to augment or modify commands received, and indicate whether they are to be used for specific connections on which they are received, for all client connections, or some other scope.

## Claims

### Claim 1

A database management system comprising
a) a network interface, for receiving database queries from two or more client applications, the client applications operating on two or more user client computers, the system providing a least one connection into the system for each such client application;
b) a group of one or more operational nodes for executing the queries as database operations, each operational node implemented as a logical collection of software components that execute on one or more physical machines;
c) client applications establish connections with the database and interact with the system in some query language;
d) one or more operational nodes operating as storage nodes and collectively referred to as a storage nodegroup;
e) one or more operational nodes operating as compute nodes and collectively referred to as compute nodegroup;
f) the system further storing user data in tables, and grouping the tables into databases;
g) tables are associated with storage nodegroups;
h) data for each of the tables is stored on nodes in one or more associated storage nodegroups according to some specified distribution method;
i) a Dynamic Query Planner (DQP) analyzes queries received for execution from client applications and transforms those queries into query execution steps (QES) based on factors including a type of input query, a schema of the referenced tables, and a manner in which data in a given table is distributed on the one or more storage nodegroups;
j) client applications perform groups of actions called transactions that make changes to data in one or more tables, and whereby the data in each table is associated with two or more storage nodegroups, and where the transactions further require that all of the actions in a transaction are completely carried out, or that none of the actions in a transaction are carried out, but never that some but not all of the actions in a transaction are carried out; and
k) a persistent state is associated with each connection including at least a compute nodegroup that is associated with the connection.

### Claim 2 (depends on 1)

The system of claim 1 further wherein the association between a table and a first storage nodegroup is created at a time when the table is created, the association also specifying a data distribution method to be used.

### Claim 3 (depends on 1)

The system of claim 1 further wherein a table is associated with one or more storage nodegroups at the same time as when the table is created, and each association between a table and a storage nodegroup also specifying its own distribution method.

### Claim 4 (depends on 1)

The system of claim 1 and further wherein there are multiple copies of the data in a table either through its association with one storage nodegroup with a broadcast distribution method, or through association with more than one storage nodegroup, and whereby the system guarantees that any change to data in a table shall be performed in a transaction consistent manner to all copies of the data in the table.

### Claim 5 (depends on 1)

The system of claim 1 and further wherein a client application performs an operation that makes changes to data that must be treated as a single atomic operation either
l) simplicitly, where a single statement performing the change is treated to be a single implicit transaction, or
m) explicitly, through the use of a language construct that delineates boundaries of the transaction, where an entire operation between the beginning and end of a transaction is treated as a single explicit transaction.

### Claim 6 (depends on 1)

The system of claim 1 and further wherein a client application begins an explicit transaction, performs one or more operations, and then determines whether the client application further expects these operations to either
n) ‘commit’ to make them permanent, or
o) ‘rollback’ to entirely reverse an effect of any operations that had been performed,
and whereby the system, upon receipt of a command to commit the operation, either performs the complete transaction as an atomic operation in that all of the changes contemplated in those operations is performed, or abort the transaction in that all the changes contemplated in those operations is completely reversed, and whereby the system, upon receipt of a command to rollback the operation completely reverses all changes contemplated by the operations, and whereby these changes are made in a transaction-consistent manner to all copies of table data.

### Claim 7 (depends on 1)

The system of claim 1 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being initialized to some appropriate initial value upon the commencement of a transaction, either implicit or explicit.

### Claim 8 (depends on 1)

The system of claim 1 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being updated to a non-initial value when the transaction makes a change that must be committed on that storage node.

### Claim 9 (depends on 1)

The system of claim 1 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being inspected when the client application submits a command to the system to commit an associated transaction, in a case of an explicit transaction, or when the system determines that the command must be completed, in a case of an implicit transaction, and wherein the system determines a list of nodes on which changes have been made as a result of the transaction.

### Claim 10 (depends on 9)

The system of claim 9 wherein the system performs a directed commit on a single node when it finds that the resulting change(s) only affected that single node.

### Claim 11 (depends on 9)

The system of claim 9 wherein the system performs a distributed commit on multiple nodes when it finds that change(s) have been made on multiple nodes.

### Claim 12 (depends on 1)

The system of claim 1 whereby the persistent state associated with the connection includes a transaction state associated with each storage node, said transaction state being inspected when the client submits a command to rollback the transaction, or when the system determines that the command must be aborted, and the system further determines a list of nodes on which changes have been made as a result of the transaction.

### Claim 13 (depends on 12)

The system of claim 12 wherein the system performs a directed rollback on a single node if it finds that that the change(s) only affected that single node.

### Claim 14 (depends on 12)

The system of claim 12 wherein the system performs a distributed rollback on multiple nodes if it finds that change(s) have been made on multiple nodes.

### Claim 15 (depends on 1)

The system of claim 1 further comprising a Dynamic Query Plan (DQP) algorithm whereby the system chooses an appropriate distribution of data in a table for each query based on operations being performed in the query.

### Claim 16

A method for managing a database comprising
a) receiving database queries from two or more client applications via a network interface, the client applications operating on two or more user client computers, with a least one connection provided for each such client application;
b) executing the queries a database operations on a group of one or more operational nodes, each operational node implemented as a logical collection of software components for executing on one or more physical machines;
c) client applications connecting and interacting in some query language;
d) operating one or more operational nodes as storage nodes and collectively referred to as a storage nodegroup;
e) operating one or more operational nodes as compute nodes and is collectively referred to as compute nodegroup;
f) storing user data in tables, and grouping the tables into databases;
g) associating tables with storage nodegroups;
h) storing data for each of the tables on nodes in one or more associated storage nodegroups according to some specified distribution method;
i) analyzing, via a Dynamic Query Planner (DQP), queries received for execution from client applications and transforming those queries into query execution steps (QES) based on factors including a type of input query, a schema of the referenced tables, and a manner in which data in a given table is distributed on the one or more storage nodegroups;
j) performing groups of actions called transactions that make changes to data in one or more tables, and whereby the data in each table is associated with two or more storage nodegroups, and where the transactions further require that all of the actions in a transaction are completely carried out, or that none of the actions in a transaction are carried out, but never that some but not all of the actions in a transaction are carried out; and
k) associating a persistent state with each connection including at least a compute nodegroup that is associated with the connection.

### Claim 17 (depends on 16)

The method of claim 16 further comprising creating an association between a table and a first storage nodegroup at a time when the table is created, the association also specifying a data distribution method to be used.

### Claim 18 (depends on 16)

The method of claim 16 further comprising associating a table with one or more storage nodegroups at the same time as when the table is created, and each association between a table and a storage nodegroup also specifying its own distribution method.

### Claim 19 (depends on 16)

The method of claim 16 wherein there are multiple copies of the data in a table either through its association with one storage nodegroup with a broadcast distribution method, or through association with more than one storage nodegroup, and further
guaranteeing that any change to data in a table is performed in a transaction consistent manner to all copies of the data in the table.

### Claim 20 (depends on 16)

The method of claim 16 further wherein a client application performs an operation that makes changes to data that must be treated as a single atomic operation that is either
l) implicitly, where a single statement performing the change is treated to be a single implicit transaction, or
m) explicitly, through the use of a language construct that delineates boundaries of the transaction, where an entire operation between the beginning and end of a transaction is treated as a single explicit transaction.

### Claim 21 (depends on 16)

The method of claim 16 and further wherein a client application begins an explicit transaction, performs one or more operations, and then determines whether the client application further expects these operations to either
n) ‘commit’ to make them permanent, or
o) ‘rollback’ to entirely reverse an effect of any operations that had been performed,
and whereby upon receipt of a command to commit the operation, the method further comprises
performing the complete transaction as an atomic operation in that all of the changes contemplated in those operations is performed, or
aborting the transaction in that all the changes contemplated in those operations is completely reversed, and whereby,
upon receipt of a command to rollback the operation, completely reversing all changes contemplated by the operations, such that changes are made in a is transaction-consistent manner to all copies of table data.

### Claim 22 (depends on 16)

The method of claim 16 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being initialized to some appropriate initial value upon the commencement of a transaction, either implicit or explicit.

### Claim 23 (depends on 16)

The method of claim 16 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being updated to a non-initial value when the transaction makes a change that must be committed on that storage node.

### Claim 24 (depends on 16)

The method of claim 16 and further wherein the persistent state associated with a connection includes a transaction state associated with each storage node, said transaction state being inspected when the client application submits a command to the method to commit an associated transaction, in a case of an explicit transaction, or when the method determines that the command must be completed, in a case of an implicit transaction, and wherein the method determines a list of nodes on which changes have been made as a result of the transaction.

### Claim 25 (depends on 24)

The method of claim 24 additionally comprising:
performing a directed commit on a single node when the resulting change(s) only affected that single node.

### Claim 26 (depends on 24)

The method of claim 24 additionally comprising:
performing a distributed commit on multiple nodes when it finds that change(s) have been made on multiple nodes.

### Claim 27 (depends on 16)

The method of claim 16 whereby the persistent state associated with the connection includes a transaction state associated with each storage node, said transaction state being inspected when the client submits a command to rollback the transaction, or when the method determines that the command must be aborted, and the method further determines a list of nodes on which changes have been made as a result of the transaction.

### Claim 28 (depends on 27)

The method of claim 27 additionally comprising:
performing a directed rollback on a single node or multiple nodes corresponding to whether the change(s) only affected that single node or multiple nodes.

### Claim 29 (depends on 16)

The method of claim 16 further comprising:
via a Dynamic Query Plan (DQP) algorithm, choosing an appropriate distribution of data in a table for each query based on operations being performed in the query.
