Multi-user Geodatabase Editing Workflows
Derek Law ESRI – Redlands Feb 19, 2009 Copyright 2006 © ESRI All Rights Reserved.
Outline • Geodatabase overview • Editing environments in multi-user geodatabases – Non-versioned editing – Versioned editing • Versioned editing with move to base
• Summary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
2
Defining the geodatabase (GDB) • Container of spatial & attribute data – Collection of geographic datasets
• Native data structure for ArcGIS • Provides the ability to: – Leverage data relationships – Enforce data integrity – Create intelligent features
Surveys Addresses
Networks Vectors
Annotation
3D Objects Attribute
Topology Dimensions Terrain
Cadastral
Geodatabase CAD
Cartography Images
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
3
Types of geodatabases • MS Access-based personal GDB • File GDB • Multi-user GDB (ArcSDE technology) – 3 editions: – Desktop, Workgroup: SQL Server Express – Enterprise: DB2, Informix, Oracle, PostgreSQL, & SQL Server
ArcGIS Server
ArcGIS Desktop
Personal
File
File
Desktop
Workgroup
Enterprise
Capacity Number of users Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
4
Multi-user geodatabase (a.k.a. ArcSDE geodatabase) Required software environment
ArcObjects ArcSDE technology DBMS
Multi-user Geodatabase
Operating system
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
5
Outline • Geodatabase overview • Editing environments in multi-user geodatabases – Non-versioned editing – Versioned editing • Versioned editing with move to base
• Summary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
6
Multi-user geodatabase editing environments 1. Non-versioned editing – Directly edit the base tables (since 9.2 release) – Supports short transaction workflows – Edits immediately available upon save
2. Versioned editing – – –
Available since initial ArcGIS 8.0 release Supports long transaction workflows Lineage of change maintained by SDE tables
3. Versioned editing (with move to base) – Option of versioned editing (since 9.2 release) – If editing non-DEFAULT version, stores edits in delta tables – Upon save or post to DEFAULT, edits are moved to the base tables
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
7
Non–versioned editing • Preserves last set of edits on a dataset
• Editing option for data that is used with non-ESRI clients • Uses the underlying DBMS transaction model – Edits immediately available upon save
• Simple data only – Points, lines, polygons, annotation, & relationship classes – NO topology & geometric networks
• •
No archiving, geodatabase replication No conflict detection
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
8
Support for information technology (IT) systems • Non-versioned editing provides better geodatabase integration with IT/enterprise systems • Non-ESRI applications see edits in base tables • Edits are applied base tables – No delta tables are used, i.e., no A & D tables
• DBMS behavior is easy to implement
3rd party applications
Only see the base table: Do not understand contents of A & D tables
Copyright 2006 © ESRI All Rights Reserved.
Base table
ArcGIS editing applications
Base & delta tables: Can read & edit versioned data
Fed UC 2009 Tech Session
9
Editing in a non-versioned environment • • •
Versioning tab - uncheck undo/redo capability Start Edit Session Exclusive database lock when updating feature(s) – Lock held until edit session is saved or rolled back • Hourglass
lingers; does not time out
User User 11
User User 22
Blocked
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
10
No undo/redo in non-versioned editing • Edits between save operations are a single DBMS transaction – Save changes → commit in database – Stop editing with unsaved edits → rollback changes
Undo/redo Undo/redo not not available available during edit session during edit session
33 edits edits in in current current edit session edit session
Copyright 2006 © ESRI All Rights Reserved.
Stop editing: commit or rollback
Fed UC 2009 Tech Session
11
Workflow considerations • Concurrency issues must be identified – Design workflow to prevent/minimize blocking • Spatially distribute your editors (e.g., edit different areas)
– Blocking related to DBMS isolation levels
• No conflict detection – Prevent/minimize lost edits by designing appropriate workflow
• Integrating non-ESRI applications – Edits immediately available upon save – Can use DBMS behavior to enforce integrity
• Geodatabase compress not necessary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
12
Outline • Geodatabase overview • Editing environments in multi-user geodatabases – Non-versioned editing – Versioned editing – Define versioning – Feature class tables & ArcSDE repository – Reconcile & conflict detection – Post – Compress • Versioned editing with move to base
• Summary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
13
Versioned editing • Basis for multiple users editing data simultaneously • Supports GIS editing workflows DEFAULT with long transactions – Edits stored in delta tables
• Simple & complex data – Points, lines, polygons, annotation, & relationship classes – Topology & geometric networks Editor 1 version
Editor 2 version
• Facilitates archiving, geodatabase replication • Conflict detection available during reconcile
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
14
Versioning workflows – applications • Editing with Long Transactions – Isolate work across multiple sessions • Edits do not impact others • E.g., Parcel editing
Public
Analyst
Public
Flood
Farmland
Residential
• Model what-if scenarios – Simulate situations with versions – E.g., Disaster event planning
• Workflow management – Create versions for project stages • E.g., Land development
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
15
What is versioning? • Storing edits without affecting the original data • A version is a specific “view” of the geodatabase – Persistent record of changes – Applies to the entire geodatabase, NOT on a feature class – All multi-user geodatabases have a DEFAULT version
• Versions are not affected by changes occurring in other versions of the geodatabase
ArcSDE technology Parcels version
Zoning version Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
16
Concept of versioning
Sample table
2 editors make changes User 1 User 2 User 1
Another table records changes User 1
User 2
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
17
Versioning - getting started • Before editing, must register a dataset as versioned in ArcCatalog – Creates the delta tables for an individual dataset
• Must register entire feature dataset – Registers ALL feature classes
• Version manager: create versions that support business workflow – In ArcCatalog or ArcMap
• Set properties for each version – E.g., owner, permissions, description
• Every version has a parent, except for DEFAULT
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
18
Feature class tables in the geodatabase
ArcObjects
Multi-user Geodatabase
Base tables
Delta tables
DBMS
** Spatial type storage will not have “F” table **
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
19
ArcSDE repository tables in the geodatabase Feature class tables DBMS
Geodatabase system tables
Versioning related tables
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
20
Demo 1 Register a feature class as versioned; create versions, & perform edits
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
21
Versioning terminology VERSION_NAME
• State – Unit of work – A number per edit – Made up of multiple transactions at the DBMS level
State (base) 0
• Lineage – Set of states belonging to a version – Logical map of states
State 1
• Visualization of a lineage • State_Lineages table
• Version – Textual pointer to a state – Represents entire lineage of edits
LINEAGE
• State tree
State 2
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
22
Versioning - putting it all together Parcels feature class
Default
Business
User 1
F S
User 2 A
State 1 (add)
State 2 (delete)
State 3 (merge)
State 4 (add)
User 1’s version
1
3
2
3
4
D
User 2’s version A
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
23
Version management Parcels feature class Business
A
D 1
3
4
2
3
F S DEFAULT
0 User 1 version
User 2 version
1
2
3
4
User 1 version
User 2 version
Lineage 3, 1, 0
Lineage 4, 2, 0 A
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
24
Version hierarchies • Select workflow combination that best matches business practices Direct editing of SDE.DEFAULT
Editing children of SDE.DEFAULT
Editing children of surrogate SDE.DEFAULT
Multiple tier SDE.DEFAULT: versioning hierarchy
SDE.DEFAULT
SDE.DEFAULT
SDE.DEFAULT
SDE.DEFAULT
Represents a version A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
25
Merging changes - reconcile & post • ArcMap includes methods for merging versions – Tools available to resolve conflicts Edit (child) version
Target (parent) version Reconcile pulls changes from target into edit version
Reconcile
Edit (child) version
Target (parent) version Post pushes changes from edit into target version Post ALWAYS follows reconcile
Post A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
26
Version change detection
9.3
• New version changes viewer tool – Enables users to compare a version with an ancestor version, without performing a reconcile – Shows all inserts, deletes, & updates made to the version since the last time it and the selected version were identical – Total # of changes shown, per feature class – Do not have to be in an edit session
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
27
Reconcile • Incorporates edits from parent (target) version to child (edit) version – Can reconcile against any ancestor version – Performed in an edit session – Can undo changes – Must be done before a post operation
• Detects differences & discovers conflicts • Must be the only user currently editing version to execute
Current Parent
Plan1 Child
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
28
Reconciling conflicts • •
Conflicts detected if edit(s) occurred to same object 2 scenarios: 1. UPDATE/UPDATE 2. UPDATE/DELETE
• •
Conflicts require resolution by reconciling user Message notifies of conflict – Choose to abort or resolve conflicts – Followed by a resolution dialog box
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
29
User experience for conflict detection Object ID
Name
Color
88
Sam
Red
Sam
•
When reconcile is performed, 2 options for detecting conflicts: 1. By object ID • A feature is in conflict when 2 users edit any part of the same feature Editor 2
Editor 1 Object ID
Name
Color
88
Jane
Red
Object ID
Name
Color
88
Sam
Blue
Object ID
Name
Color
88
Sam
Blue
Sam
Jane
2. By attribute • A feature is in conflict only if 2 users edit the same attribute Editor 2
Editor 1 Object ID
Name
Color
88
Jane
Red
Sam
Jane
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
30
Conflict resolution dialog • Provides ability to visualize & manage conflicts from both the target & edit versions – Interactive dynamic display of each version – Common ancestor state is also viewable
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
31
Merge geometries option
9.3
• Enhances conflict resolution management • Allows users to resolve geometry conflicts by merging representations from both versions • Applicable for editing large polyline & polygon features – E.g., water mains, coastlines
merge
Edit version
Target version
Edit version
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
32
Post • Synchronizes current edit session with target version – Modifications saved to target; 2 versions now identical – Must be done in an edit session – Performed after reconciling with another version Current – Cannot be undone Parent
• Applying changes to target version
– Not necessary to post – optional • Depends on workflow
Plan1 Child
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
33
Compressing the geodatabase • Maintains performance – Removes unreferenced rows from delta tables – Reduces depth of state tree
• Run periodically, based on editing activity – Must compress as “SDE” user – Update statistics before & after
Before Before
0
SDE.DEFAULT
58
60
59
61
RALEIGH.EDIT 62
• Depends on editing activity – Not unreasonable to compress every night
WILSON.EDIT
After After
59
HELPER.STUDY (deleted)
0 60
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
34
Demo 2 Reconcile & post versions
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
35
Outline • Geodatabase overview • Editing environments in multi-user geodatabases – Non-versioned editing – Versioned editing • Versioned editing with move to base
• Summary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
36
Versioned editing with move to base
• • • •
Versioned behavior if editing dataset in non-DEFAULT version If editing DEFAULT, edits are applied to base tables Suggested for non-ESRI client interaction Simple data only – Points, lines, polygons, annotation, & relationship classes
• •
No archiving, geodatabase replication Supports undo/redo
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
37
Workflow considerations • IT integration – Uses DBMS behavior to enforce data integrity – Use geodatabase behavior for ArcGIS editing
• Versioning behavior on non-DEFAULT versions – Edits are stored in the delta tables
• No conflict detection on DEFAULT – Option: Use surrogate for conflicts before posting to DEFAULT
• Geodatabase compress necessary
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
38
Editing DEFAULT version • Start editing DEFAULT • Edits stored in A & D tables
ZIP_CODES Base table (state 0)
– Each edit receives state ID – Enables undo/redo capability
No edits have occurred (state 0)
A40
During edit session (edits in A & D tables)
D40
A Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
39
Save - edits are moved to base table • DEFAULT version references new state – Last state of edit session
• Edits referenced by DEFAULT moved to base table – Edits now at state 0 ZIP_CODES OID 2 - deleted
OID 11 - new feature, no attribute OID 5 - updated feature geometry OID 12 - new feature, new attribute
Save edit session (edits now in base tables)
A40 D40 Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
40
Summary: Multi-user geodatabase editing options Non-versioned editing
Versioned editing with move to base
Versioned editing
Editable data types
Simple feature classes
Simple feature classes
All data types
Supported workflows
Simple
DBMS transaction “type”
Short (single edit session)
Long (multiple edit session)
Long (multiple edit session)
Supports undo/redo
No
Yes
Yes
Feature class tables involved
Base table
Base & possibly delta tables
Delta tables
Supports archiving & replication
No
No
Yes
Supports DBMS data integrity features
Yes
Copyright 2006 © ESRI All Rights Reserved.
Simple & advanced with versions Archiving /replication not supported
Yes - when editing DEFAULT version; after save No – when editing other versions
Simple & advanced with versions Archiving & replication supported
No
Fed UC 2009 Tech Session
41
Summary • Geodatabase overview • Editing environments in multi-user geodatabases – Non-versioned editing – Versioned editing – Define versioning – Feature class tables & ArcSDE repository – Reconcile & conflict detection – Post – Compress • Versioned editing with move to base
• Please complete review survey
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
42
Questions? Feedback on the geodatabase/ArcSDE: Derek Law (
[email protected])
Copyright 2006 © ESRI All Rights Reserved.
Fed UC 2009 Tech Session
43