Synchronizing databases
First Claim
Patent Images
1. A method comprising:
- for every insertion of a row or updating to the row in a table of a master database, incrementing a master global number and setting a master row number for the row to the master global number, wherein there is one master row number for every row in every table of the master database;
receiving all changes to a slave database that were made since a last database synchronization between the master database and the slave database;
updating the master database with the changes;
reverting the slave database back to a state of the slave database when the last database synchronization occurred;
receiving a slave global number that represents a value of the master global number when the last database synchronization occurred;
determining any rows of the master database with master row numbers that are higher than the slave global number indicating that the rows were inserted or updated since the last database synchronization occurred; and
for every deletion of a row in a table of the master database from a view, incrementing the master global number and setting the master row number for the deleted row to a negative value of the master global number.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer that manages a master database synchronizes the master database and a slave database by receiving a change made to the slave database, integrating the change to the slave database into the master database, and sending, to a second computer that manages the slave database, a portion of the master database that has changed since a previous synchronization operation between the master and slave databases.
-
Citations
10 Claims
-
1. A method comprising:
-
for every insertion of a row or updating to the row in a table of a master database, incrementing a master global number and setting a master row number for the row to the master global number, wherein there is one master row number for every row in every table of the master database;
receiving all changes to a slave database that were made since a last database synchronization between the master database and the slave database;
updating the master database with the changes;
reverting the slave database back to a state of the slave database when the last database synchronization occurred;
receiving a slave global number that represents a value of the master global number when the last database synchronization occurred;
determining any rows of the master database with master row numbers that are higher than the slave global number indicating that the rows were inserted or updated since the last database synchronization occurred; and
for every deletion of a row in a table of the master database from a view, incrementing the master global number and setting the master row number for the deleted row to a negative value of the master global number. - View Dependent Claims (2, 3, 4, 5)
determining any rows of the master database with master row numbers that are lower than a negative value of the slave global number indicating that the rows were deleted from the view since the last database synchronization occurred.
-
-
3. The method of claim 2 further comprising:
sending information about the rows of the master database which, if any, have master row numbers that are higher than the slave global number or lower than the negative value of the slave global number.
-
4. The method of claim 3 wherein the sending further comprises sending from one computer to a second computer the information comprising which, if any, rows of the master database have master row numbers that are higher than the slave global number and the current data in these rows.
-
5. The method of claim 3 wherein the sending further comprises sending from one computer to a second computer the information comprising which, if any, rows of the master database have master row numbers that are lower than the negative value of the slave global number.
-
6. An apparatus comprising:
-
a first memory that stores a first set of computer instructions and a master database, wherein a first processor executes the first set of computer instructions to;
for every deletion of a row in a table of the master database from a view, increment the master global number and set the master row number for the deleted row to a negative value of the master global number;
the first processor with access to the first memory;
a second memory that stores a second set of computer instructions and a slave database; and
a second processor with access to the second memory, wherein the first processor executes the first set of computer instructions to;
for every insertion of a row or updating to the row in a table of the master database, increment the master global number and set the master row number for the row to the master global number, wherein there is one master row number for every row in every table of the master database;
receive, from the second processor, all change to the slave database that were made since a last database synchronization between the master database and the slave database occurred;
update the master database with the changes;
receive, from the second processor, a slave global number that represents a value of the master global number when the last database synchronization occurred, and determine any rows of the master database with master row numbers that are higher than the slave global number indicating that the rows were inserted or updated since the last database synchronization occurred, wherein the second processor executes the second set of computer instructions to revert the slave database back to a state of the slave database when the last database synchronization occurred. - View Dependent Claims (7, 8, 9, 10)
determine any rows of the master database with master row numbers that are lower than a negative value of the slave global number indicating that the rows were deleted from the view since the last database synchronization occurred.
-
-
8. The apparatus of claim 7 wherein the first processor executes the first set of instructions to:
send, to the second processor, information about the rows of the master database which, if any, have master row numbers that are higher than the slave global number or lower than the negative value of the slave global number.
-
9. The apparatus of claim 8 wherein the information comprises which, if any, rows of the master database have master row numbers that are higher than the slave global number and the current data in these rows.
-
10. The apparatus of claim 8 wherein to send further comprises to send information about the rows of the master database which, if any, have master row numbers that are higher than the slave global number or lower than the negative value of the slave global number.
Specification