Home    |    Concepts   |   API   |   Samples
Concepts > Versioning > Basic Principles
State Tree

A state has one owner, which is set to the user who creates the state. Only the owner of a state, or the ArcSDE administrator, can modify the properties of a state or delete it.

A state may be OPEN or CLOSED. An open state allows the owner to add, delete or modify rows. You can not create new child states from an open state. Only the leaf nodes in the state tree can be open. Only the owner of a state, or the ArcSDE administrator, can open or close a state.

Only child states, or leaf nodes, of a database can be deleted, and only the owner or the ArcSDE administrator can perform the deletion.

Database states can be compared for row conflicts (deletions, additions, and modifications) between two states. A conflict is when the same row is different between the two states being compared or merged. States can be merged automatically where the changes in one state take priority when conflicts occur. Applications can manually resolve conflicts and allow changes to be selectively applied to the database.

You can trim the state tree, which collapses a linear branch of the tree. The child state will replace the parent state within the branch and discard all states which deviate from the direct path. Trimming database states reduces the depth of the state tree, shortening the lineage and improving query performance.

Trimming the state tree from state 7 to state 2, before and after.

You can also compress the state tree. Compressing the state tree removes each state that is not currently referenced by a version and not the parent of multiple child states. When executed by the ArcSDE administrator, all states that meet the compress criterion are removed regardless of owner. All other users can compress only the states that they own. This operation reduces the depth of the state tree, shortening the lineage and improving query performance.

The following example illustrates compressing the state tree:

Please also refer to the section on versioning in the Working with versioned data book of the ArcGIS Desktop or ArcGIS Server Help. (Can be accessed from the ArcGIS Resource Center.)
feedback | privacy | legal