locked
How to synchronize master->detail->detaildetail ... tables? RRS feed

  • Question

  •  

    I have master table and 1:N->1:N->1:N  relationships, what is the sequence sync actions? Will it be one transaction?

    What if sync process will be broken?

     

    Thank you.

     

    • Moved by Max Wang_1983 Friday, April 22, 2011 8:25 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, January 15, 2008 5:03 PM

Answers

  •  

    I believe this is the question many people have to deal with.

     

    SyncSerivce sync-es table in a particular order -- the order that specified by the users when adding the tables to the syn group. the rule of thumb is to add the parent table first and then its child tables. and sync serivce applies the changes in such order for update/insert and reversed order for delete.

     

    if you don't want any of the PK-FK row relationships broken during/after the sync, you can put them in a single syncgroup and then all changes in this group will be done in one transaction to ensure data consistent among the PK-FK tables. --- as you may see, there would be some concurrent impact on the server/client db.

     

    hope this helps.

     

    thanks

    yunwen

    Tuesday, January 15, 2008 10:20 PM
    Moderator

All replies

  •  

    I believe this is the question many people have to deal with.

     

    SyncSerivce sync-es table in a particular order -- the order that specified by the users when adding the tables to the syn group. the rule of thumb is to add the parent table first and then its child tables. and sync serivce applies the changes in such order for update/insert and reversed order for delete.

     

    if you don't want any of the PK-FK row relationships broken during/after the sync, you can put them in a single syncgroup and then all changes in this group will be done in one transaction to ensure data consistent among the PK-FK tables. --- as you may see, there would be some concurrent impact on the server/client db.

     

    hope this helps.

     

    thanks

    yunwen

    Tuesday, January 15, 2008 10:20 PM
    Moderator
  •  

    Yunwen, I have further questions on the response you gave.

     

    I had designed the equivalent of MS-sync services for a company I worked for. It took 2 years to get all the thorny issues under control, and not breaking parent child insertions/updates/deletes was certainly one of the major issues.

     

    My question: Even though you can configure the parent and child in a single syngroup, does that ALONE guarantee the order of insert of the PK-FK relationship, or does one have to ADDITIONALLY add the tables to the sync-group in the odrer you want the inserts/updates to occur? Does the syncgroup configuration have some magic that analyzes the table relationships at the server, and then automatically applies the correct sync order?

    Friday, March 14, 2008 5:07 PM