Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Maintaining row state information is a powerful part of the UltraLite feature set. Tracking the state of tables and rows is particularly important for data synchronization.
An internal marker is used to keep track of the row state in an UltraLite database. Row states control transaction processing, recovery, and synchronization. When a row is inserted, updated, or deleted, the state of the row is modified to reflect the operation and the connection that performed the operation. When a transaction is committed, the states of all rows affected by the transaction are modified to reflect the commit. If an unexpected failure occurs during a commit, the entire transaction is rolled back. The following list summarizes these behaviors:
When a delete is issued The state of each affected row is changed to reflect the fact that it was deleted. Restore the original state of the row to undo the delete.
When a delete is committed The affected rows are not always removed from memory. If the row has never been synchronized, then it is removed. If the row has been synchronized, then it is not removed, because the delete operation needs to be synchronized to the consolidated database first. After the next synchronization, the row is removed from memory.
When a row is updated A new version of the row is created. The states of the old and new rows are set so the old row is no longer visible and the new row is visible.
When a row update is committed When a transaction is committed, the states of all rows affected by the transaction are modified to reflect the commit. When an update is synchronized, both the old and new versions of the row are needed to allow conflict detection and resolution. The old row is then deleted from the database and the new row simply becomes a normal row.
When a row is added The row is added to the database and is marked as not committed.
When an added row is committed The row is marked as committed and is also flagged as requiring synchronization with the consolidated database.
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|