Best practices on synchronising related tables RRS feed

  • Question

  • Hi All,

    What are the best practices on synchronizing related tables from a mobile device.

    Currently my tables all have identity seeds as primary keys, is this the best way to maintain the referential integrity or should I change them to be manually maintained?

    If you provide links or examples I would appreciate it.


    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:49 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, October 28, 2009 1:11 PM


  • I can see a couple of questions here:

    1. ID or ID range management, this needs to be handled in the Sync Application layer, please find details in BOL, section: Auto-Increment (Identity) Columns
    2. best pratice with tables with RIs. recommendataion is to put the related tables in the same table group, so that the changes can be handled in the same transaction to ensure the data consistency
    3. table Ordering. this is related with #2, the changes in the tables are applied in the order of syncAdapter for those tables for insert/Update and reversed order for DELETEs, so you will need to ensure this as well in the application, i.e. put PK table and then the FK tables. details can be found in section "How to: Specify the Order and Batch Size of Changes".

    Hope this helps.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, October 28, 2009 5:39 PM