Disjoint partitioning

Partitioning is controlled by the download_cursor and download_delete_cursor scripts for each table involved in synchronization. These scripts make sure of two parameters, a last download timestamp and the MobiLink user name supplied in the call to synchronize.

 To partition a table among remote databases
  1. Include in the table definition a column containing the synchronization user name in the consolidated database. You need not download this column to remote databases.

  2. Include a condition in the WHERE clause of the download_cursor and download_delete_cursor scripts requiring this column to match the script parameter.

    The script parameter is represented by a named parameter in the script. For example, the following download_cursor script partitions the Contact table by employee ID.

    SELECT id, contact_name
    FROM Contact
    WHERE last_modified >= {ml s.last_table_download}
    AND emp_id = {ml s.username}

    See download_cursor table event and download_delete_cursor table event.

 Example