# US 8,751,441 B2 · System, method, and computer program product for determining SQL replication process

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

- Number: US 8,751,441 B2
- Document ID: US8751441B2
- Status: Granted
- Kind: B2
- Application number: 12/183,505
- Filed: 2008-07-31
- Published: 2010-02-04
- Granted: 2014-06-10
- Earliest claimed: 2008-07-31
- Assignees: Sybase, Inc.
- Applicants: Heping Shang; Elena Lora-Gallardo; Andrzej Sarapuk
- Inventors: Heping Shang; Elena Lora-Gallardo; Andrzej Sarapuk
- Web page: https://patentgrep.com/patent/US8751441B2

## CPC

- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method, and computer program product are provided for replicating a table in a source database to a target database. In accordance with an embodiment of the present invention, a subscription to the table is defined and a query is executed on the source database. The query is then normalized, and it is determined whether the query would cause semantically appropriate changes to the target database. If so, the normalized query is sent to the target database for execution, in accordance with an additional embodiment of the present invention.

## Claims

### Claim 1

A method for replicating a table in a source database to a target database, comprising:
defining a subscription for replicating data from the table in the source database to the target database;
normalizing a query executed on the source database;
determining, based on parameters of the subscription, that the normalized query would cause changes to the target database that are semantically correct by comparison to changes made to the source database by the query executed on the source database;
determining that sending the normalized query to the target database is computationally preferable to propagation of log-based replication change data; and
sending the normalized query to the target database for execution responsive to the determinations that the sending is computationally preferable and that the changes would be semantically correct.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
sending the change data, the change data comprising atomic changes, to the target database for execution based on a determination that the normalized query would not cause changes to the target database that are semantically correct relative to changes made to the source database by the query executed on the source database.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining whether the normalized query would cause semantically correct changes to the target database is performed when the subscription is defined.

### Claim 4 (depends on 1)

The method of claim 1, wherein sending the normalized query comprises sending the normalized query as part of a transaction log.

### Claim 5 (depends on 4)

The method of claim 4, wherein the transaction log comprises one or more transactions, the normalized query associated with one of the one or more transactions.

### Claim 6 (depends on 5)

The method of claim 5, wherein the target database processes the transaction log by processing the one or more transactions in commit order.

### Claim 7

A system for replicating a table in a source database to a target database, comprising:
a defining module configured to define a subscription for replicating data from the table in the source database to the target database;
a normalizing module configured to normalize a query executed on the source database;
a determining module configured to determine, based on parameters of the subscription, that the normalized query would cause changes to the target database that are semantically correct by comparison to changes made to the source database by the query executed on the source database, and configured to determine that sending the normalized query to the target database is computationally preferable to propagation of log-based replication change data; and
a sending module configured to send the normalized query to the target database for execution responsive to the determinations that the sending is computationally preferable and that the changes would be semantically correct.

### Claim 8 (depends on 7)

The system of claim 7, wherein the sending module is further configured to send the change data, the change data comprising atomic changes, to the target database for execution based on a determination that the normalized query would not cause changes to the target database that are semantically correct relative to changes made to the source database by the query executed on the source database.

### Claim 9 (depends on 7)

The system of claim 7,
wherein determining whether the normalized query would cause semantically correct changes to the target database is performed when the subscription is defined.

### Claim 10 (depends on 7)

The system of claim 7, wherein the sending module is further configured to send the normalized query as part of a transaction log.

### Claim 11 (depends on 10)

The system of claim 10, wherein the transaction log comprises one or more transactions, the normalized query associated with one of the one or more transactions.

### Claim 12 (depends on 11)

The system of claim 11, wherein the target database processes the transaction log by processing the one or more transactions in commit order.

### Claim 13

A computer-usable medium having computer program logic recorded thereon for replicating a table in a source database to a target database, execution of which, by a computing device, causes the computing device to perform operations comprising:
defining a subscription for replicating data from the table in the source database to the target database;
normalizing a query executed on the source database;
determining, based on parameters of the subscription, that the normalized query would cause changes to the target database that are semantically correct by comparison to changes made to the source database by the query executed on the source database;
determining that sending the normalized query to the target database is computationally preferable to propagation of log-based replication change data; and
sending the normalized query to the target database for execution responsive to the determinations that the sending is computationally preferable and that the changes would be semantically correct.

### Claim 14 (depends on 13)

The computer-usable medium of claim 13, the operations further comprising:
sending the change data, the change data comprising atomic changes, to the target database for execution based on a determination that the normalized query would not cause changes to the target database that are semantically correct relative to changes made to the source database by the query executed on the source database.

### Claim 15 (depends on 13)

The computer-usable medium of claim 13, wherein determining whether the normalized query would cause semantically correct changes to the target database is performed when the subscription is defined.

### Claim 16 (depends on 13)

The computer-usable medium of claim 13, wherein sending the normalized query comprises sending the normalized query as part of a transaction log.

### Claim 17 (depends on 16)

The computer-usable medium of claim 16, wherein the transaction log comprises one or more transactions, the normalized query associated with one of the one or more transactions.

### Claim 18 (depends on 17)

The computer-usable medium of claim 17, wherein the target database processes the transaction log by processing the one or more transactions in commit order.

### Claim 19 (depends on 1)

The method of claim 1, further comprising:
sending change data, the change data comprising atomic changes, to the target database for execution based on a determination that usage of the change data would be less computationally expensive than usage of the normalized query by the target database.

### Claim 20 (depends on 7)

The system of claim 7, wherein the sending module is further configured to send change data, the change data comprising atomic changes, to the target database for execution based on a determination that usage of the change data would be less computationally expensive than usage of the normalized query by the target database.

### Claim 21 (depends on 13)

The computer-usable medium of claim 13, the operations further comprising:
sending change data, the change data comprising atomic changes, to the target database for execution based on a determination that usage of the change data would be less computationally expensive than usage of the normalized query by the target database.
