Classifying and resolving unique constraint violations during synchronization process

C. Natschläger, T. Kopetzky. Classifying and resolving unique constraint violations during synchronization process. pages 160-165, 9, 2009.

  • Christine Natschläger
  • Theodorich Kopetzky
BuchProceedings of the 2nd International Symposium in Logistics and Industrial Informatics (LINDI 2009)
TypIn Konferenzband
VerlageXpress Conference Publishing
Abstract In mobile environments data from a client database often has to be integrated into a server database during a synchronization process. Thereby unique constraint violations are possible if the client has data from an earlier point in time or only part of the data available online. When inserting data into the server database in an online scenario, a unique constraint violation can be recognized and corrected immediately. However, when being online a possible later violation might go unrecognized because of not all data being available to check against. Afterwards, when synchronizing or merging an online database with the server database, a violation will occur and the synchronization process will have to handle it. Many other synchronization and optimistic data replication approaches treat a unique constraint violation as a conflict. The advantage of this treatment is that the same logic can be used for resolving conflicts and unique constraint violations. However, sometimes conflict resolution can only resolve a unique constraint violation by overwriting an existing version, or it is not able to resolve the unique constraint violation at all. By implementing a discrete unique constraint violation resolution, the available information is utilized and overwriting data can be avoided. In most cases the violation can even be resolved automatically. After a formal definition of unique constraints, this paper identifies two classes of unique constraint violations and provides a resolution approach for each class. The classification is based on the experiences collected in a project for a social insurance company in which unique constraint violations occurred during the synchronization process. These violations were examined in detail and are also presented in this paper.