Getting started

Versioning Scenario

The following versioning scenario will illustrate how multiple versions of the database can exist simultaneously. The following example will illustrate how two users create independent edit versions, reconciling the changes against a common database version. This example will show how the versions of the database map onto the underlying database states. The following changes will take place:

 

Let User1 and User2 be two different users.

 

Let WORKING be the name of a version of the database that User1 and User 2 will modify.

 

Let EDIT1 and EDIT2 be the name of two versions of the database that contain the modifications made by User1 and User2 respectively.

 

This is the sequence of database versions that the user sees:

 

This is the underlying database configuration from the state perspective:

 

This sequence is represented in the diagram below. The state dependencies are shown on the left, while the associated tables are shown on the right.

 

 Example using the simple version modeling schema

 

The different versions available in this database that correspond to states 1 through 5 are shown below. In the figures, the state column is shown for illustration purposes (it is not visible to the user).

 

Change 1:

 

Version-State references after Change 1:

 

Version

State

WORKING

1

 

 

WORKING Version after Change 1 (add objects 100 and 101):

 

OID

State

Data

100

1

a

101

1

b

 

Change 2:

 

Version-State references after Change 2:

 

Version

State

WORKING

1

EDIT2

2

 

 

EDIT2 Version after Change 2 (add object 103; change object 101):

 

OID

State

Data

100

1

A

101

2

Bb

103

2

d

 

 

WORKING Version after Change 2 (no change):

 

OID

State

Data

100

1

a

101

1

b

 

 

Change 3:

 

Version-State references after Change 3:

 

Version

State

WORKING

3

EDIT2

2

EDIT1

3

 

 

EDIT2 Version after Change 3 (no change):

 

OID

State

Data

100

1

a

101

2

bb

103

2

d

 

 

EDIT1 Version after Change 3 (add object 102; change object 100):

 

OID

State

Data

100

3

aa

101

1

b

102

3

c

 

 

WORKING Version after Change 3 (add object 102; change object 100):

 

OID

State

Data

100

3

aa

101

1

b

102

3

c

 

 

Change 4:

 

Version-State references after Change 4:

 

Version

State

WORKING

4

EDIT2

2

EDIT1

4

 

 

EDIT2 Version after Change 4 (no change):

 

OID

State

Data

100

1

a

101

2

bb

103

2

d

 

 

EDIT1 Version after Change 4 (change object 101; delete object 100):

 

OID

State

Data

100

4

<delete>

101

4

bbb

102

3

c

 

WORKING Version after Change 4 (change object 101; delete object 100):

 

OID

State

Data

100

4

<delete>

101

4

bbb

102

3

c

 

 

Change 5:

 

Version-State references after Change 5:

 

Version

State

WORKING

5

EDIT2

5

EDIT1

4

 

 

EDIT2 Version after Change 5 (Merge WORKING and EDIT2, accept object 101 from WORKING and object 100 from EDIT2):

 

OID

State

Data

100

5

a

101

4

bbb

102

3

c

103

2

d

 

 

EDIT1 Version after Change 5 (no change):

 

OID

State

Data

100

4

<delete>

101

4

bbb

102

3

c

 

 

WORKING Version after Change 5 (Merge WORKING and EDIT2, accept object 101 from WORKING and object 100 from EDIT2):

 

OID

State

Data

100

5

a

101

4

bbb

102

3

c

103

2

d

 

Back