Remote Database Row States

We will now examine some of the basics of the distributed database synchronization process. We will look at the states that database rows can be in as well as the state of updates that are submitted to the central database.

Remote Database Row States

While rows in the remote databases can be in any of several states, the rows in the central database can only be in a single state. Data in the central database is always the correct data. Updates to the remote databases do not become correct until the update has be sent to the central database server, updated in the central database and returned to the remote database and applied.


Row State Diagram

The states that a row in the remote database can be are:

  • Consistent – the value that was in the central database at the time of the last synchronization
  • Updated – The row has been updated on the remote database but has not been submitted to the central database.
  • Submitted – The updated row has been submitted to the central database.
  • Submit Updated – A row that has been submitted to the central database has been updated by a remote database user.
  • Collided – A collision occurred and the contents from the central database are not the same as the values as updated by the user.
  • State transitions are as follows:li>Consistent-to-Consistent – An update was received from the central database for a consistent row, the row was updated on another remote database.
  • Consistent-to-Updated – A row was updated on the remote database and has not been submitted to the central database.
  • Updated-to-Updated – Another update occurred
  • Updated-to-Submitted – The updated row has been submitted to the central database.
  • Updated-to-Collided – A row was updated by a remote database user during the update process that had been updated on another database.
  • Submitted-to-Consistent – The row update was returned from the central database without a collision.
  • Submitted-to-Submit Updated – A row was updated by a user on the remote database of a row that was submitted to the central database but had not been returned from the central database.
  • Submitted-to-Collided – The returned row in the synchronization process was a collision.
  • Submit Updated-to-Submit Updated – Another update occurred to a row after it was submitted but before the row was returned from the central database.
  • Submit Updated-to-Updated – A row in Submit Updated state was returned without collision. The Row version is updated and the row is in updated state so that it may be submitted on the next synchronization.
  • Submit Updated-to-Collided – A row in Submit Updated state was returned with a collision.
  • Collided-to-Collided – Another update for the row was received from the central database without the collision being resolved in the remote database.
  • Collided-to-Updated – The row was updated in the remote database to resolve the collision.
  • Collided-to-Consistent – The collision was resolved by accepting the updated row from the central database.

Update States

The following diagram describes the states and the state transitions for the remote database synchronization process.


Update State Diagram

The states that the synchronous process can be in are:

  • Idle – Synchronization is not in progress.
  • Update Collection – Updates to the remote database are being collected and parsed into the update file.
  • Update Collection Error – An error occurred doing the update collection.
  • Update Submission – The update file is transmitted to the central database server.
  • Submission Error – An error occurred during the transmission of the update file.
  • Update Validation – The update file is checked for compatible schema version and other items.
  • Update Invalid – The central database server determined that the received update file is invalid. The system administrator is notified.
  • Process Update – The update file is parsed and the updates are applied where possible to the central database.
  • Process Error – An error occurred while processing the updates.
  • Central Update Collection – The central database updates are packaged for submission to the remote database.
  • Collection Error – An error occurred while collecting the updates.
  • Central Update Submission – The update file is sent to the remote database.
  • Central Submission Error – An error occurred sending he data to the remote database.
  • Remote Update – The updates are applied to the remote database.