Data Evaluation Examples

Insert Followed by a Delete, Insert Followed by an Update, and Update; Not Selected to Selected show three examples of how Enterprise Replication uses logic to evaluate transactions for potential replication.
Figure 1: Insert Followed by a Delete

This figure is described in the surrounding text.

Insert Followed by a Delete shows a transaction that takes place at the Dallas office. Enterprise Replication uses the logic in Insert Followed by a Delete Evaluation Logic to evaluate whether any information is sent to the destination database server at the Phoenix office.

Table 1. Insert Followed by a Delete Evaluation Logic
Initial Image Replicate Evaluates Final Image Replicate Evaluates Primary-Key Changed? Send to Destination Database Server
INSERT T or F DELETE T or F Yes or no Nothing

Enterprise Replication determines that the insert followed by a delete results in no replication operation; therefore, no replication data is sent.

In Insert Followed by an Update, Enterprise Replication uses the logic in Insert Followed by An Update Evaluation Logic to evaluate whether any information is sent to the destination database server.
Figure 2: Insert Followed by an Update

begin figure description - This figure is described in the surrounding text - end figure description
Table 2. Insert Followed by An Update Evaluation Logic
Initial Image Replicate Evaluates Final Image Replicate Evaluates Primary-Key Changed? Send to Destination Database Server
INSERT T or F UPDATE T Yes or no INSERT with final row image

The replicate WHERE clause imposes the restriction that only rows are replicated where the exempt column contains a value of "N." Enterprise Replication evaluates the transaction (an insert followed by an update) and converts it to an insert to propagate the updated (final) image.

In Update; Not Selected to Selected, Enterprise Replication uses the logic in Update; Not Selected to Selected Evaluation Logic to evaluate whether any information is sent to the destination database server.
Figure 3: Update; Not Selected to Selected

begin figure description - This figure is described in the surrounding text - end figure description
Table 3. Update; Not Selected to Selected Evaluation Logic
Initial Image Replicate Evaluates Final Image Replicate Evaluates Primary-Key Changed? Send to Destination Database Server
UPDATE F UPDATE T Yes or no INSERT with final row image

The example shows a replicate WHERE clause column update. A row that does not meet the WHERE clause selection criteria is updated to meet the criteria. Enterprise Replication replicates the updated row image and converts the update to an insert.