Synchronizing database subsets
Database subsets are used remotely, and the records they contain must be synchronized with the main database regularly. Although in most cases, records are modified either in the subset or in the main database, you might need to resolve conflicts that arise.
Before you begin
You must connect to that database as a system administrator of the database subset to ensure that you have access to all records in the database subset and the necessary permissions.
During synchronization, you can choose whether the database subset expires after synchronization is complete.
About this task
Synchronization begins by identifying the records that are needed to repopulate the database subset by examining the queries and sets in the database subset definition. If the definition comprises any parameterized queries, then you are prompted for the parameter values. If you cancel entry of these values, then synchronization is also canceled. This step is not necessary for database subsets that are set to expire.
- All newly created records in the database subset are added to the main database, with the same record identifiers, create date and time, and the same create user.
- Any updated records in the database subset are copied to the main database:
- An update to a database subset record is applied to the main database if the main database record is unchanged since the last synchronization.
- If a record is changed in both the main and the subset databases since the last synchronization, then the conflict is resolved by applying the rule that is selected by the user.
- All soft deleted records in the database subset are ignored. They do not delete the corresponding record in the main database.
- Finally, either:
- The database subset is updated with the changes and additions that are made in the main database.
- Or, if the database subset is set to expire, then all the entity and link records are deleted, and the database subset is set to read only.
Procedure
What to do next
- Keep the changes made to all the main records that are in conflict, and discard all the changes that are made to the corresponding subset records
- Keep all the changes made to the subset records that are in conflict, and discard all the changes that are made to the corresponding main records
- If the main record is deleted, and is changed in the subset, then it is either restored and updated (to match the subset record) or re-created (depending on whether it was soft deleted or purged).
- Restoring or re-creating a link always results in its link ends being restored or re-created if necessary.
- Restoring or re-creating an entity results in its links being restored or re-created; but only for those links where the other end of the link is still active.