solidDB Help : Replication : Advanced Replication : Principles of operation : Sending data from a replica to the master
  
Sending data from a replica to the master
Sending data from a replica database to the master database is called propagation. The replica database controls when and how much data should be propagated.
When data is propagated, the propagation is done by composing a message that is sent from the replica database to the master database. The message contains SQL statements rather than rows of data. A single message can contain multiple statements and multiple transactions. There is no way to send a fragment of a transaction to the master; the message must commit the SQL statements that it sends. You can divide a message into multiple transactions, but you cannot divide a transaction into multiple messages.
Although there is almost no restriction on the SQL statements that you can use, the statements that are sent to the master database are typically the same as the statements that were executed on the replica database. For example, if the following statements were executed on the replica database, the same statements are sent to the master database to perform the same operations on the master database as were performed on the replica database.
INSERT INTO employees (id, name) VALUES (12, 'Michelle Uhuru');
UPDATE employees SET department = 'Telecommunications'
    WHERE id = 12;
Important If the replica database has only a subset of the data on the master database, a statement that has a broad WHERE clause, for example, can affect more records on the master database than on the replica database.
You use SAVE statements to compose the message that is sent from the replica database to the master database. The following pseudo-code gives an example:
INSERT INTO employees (id, name) VALUES (12, "Michelle Uhuru');
UPDATE employees SET department = 'Telecommunications'
     WHERE id = 12;
-- Save the statements for later propagation to the master
-- database.
SAVE INSERT INTO employees (id, name) VALUES
      (12, 'Michelle Uhuru');
SAVE UPDATE employees SET department = 'Telecommunications'
     WHERE id = 12;
COMMIT WORK;
Note The propagated SQL statements can include stored procedure calls.
Go up to
Principles of operation