Contents Index Data entry Handling failed downloads

MobiLink Synchronization User's Guide
  Synchronization Techniques

Handling deletes


When rows are deleted from the consolidated database, there needs to be a record of the row so it can be removed from any remote databases that have the row.

One technique is to not delete the row. Data that is no longer required can be marked as inactive by changing a status column in the row. The download_cursor and download_delete_cursor can refer to the status of the row in the WHERE clause. The CustDB sample application uses this technique for the ULOrder table using the status column, and the Contact sample uses the technique on the Customer, Contact, and Product tables.

This technique is used in the ULEmpCust table in the CustDB sample application, in which the action column holds a D for Delete. The scripts use this value to delete the record from the remote database, and delete the record from the consolidated database at the end of the synchronization.

A second technique is to have a shadow table that stores the primary key values of deleted rows. When a row is deleted, a trigger can populate the shadow table. The download_delete_cursor can use the shadow table to remove rows from remote databases. The shadow table only needs to have the primary key columns from the real table.

For more information, see


Contents Index Data entry Handling failed downloads