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.
The main database is then updated in three phases:
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
To synchronize a database subset:
Back up the main database if it is an Microsoft™ Access database. This step is unnecessary for SQL Server databases because updates are committed to the main database after each phase of the synchronization process.
Log on to iBase as a user with the Database Administrator role, and then open the main database.
Select File > Data > Database Subsets > Synchronize Database Subset.
What to do next
When a conflicting change is made in the same record (in any field in that record) in both the main database and database subset, you can choose to:
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
The user decides without knowing which records are affected or what the conflicts are, and the rule that is selected applies to all records with conflicting changes.
Notes:
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.