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.
Thanks
Phil
Moved byMax Wang_1983Thursday, April 21, 2011 10:49 PMforum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
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.
thanks Yunwen This posting is provided "AS IS" with no warranties, and confers no rights.