Databases Reference
In-Depth Information
representing that object during some period of its existence. The
one non-temporal row, and the set of version rows, cover exactly
the same period of time.
But basic versioning is the least frequently used kind of
versioning in real-world databases. The reason is that it pre-
serves a history of changes to an object for only as long as the
object exists in the database. When a delete transaction for the
object
is applied, all
the information about
that object
is
removed.
One type of versioning that is frequently seen in real-world
databases is logical delete versioning. It is similar to basic
versioning, but it uses logical deletes instead of physical deletes.
As a result, the history of an object remains in the table even
after a delete transaction is applied.
Logical Delete Versioning
In this variation on versioning, a logical delete flag is included
in the version table. It has two values, one marking the row as
not being a delete, and the other marking the row as being a
delete. We will use the values ā€œYā€ and ā€œNā€.
After the same insert and the same update transactions, our
non-temporal and logical delete version tables look as shown
in Figure 4.5 .
We are now at one clock tick before December 2010, i.e. at
November 2010. Although we have chosen to use a one-month
clock in our examples primarily because a full timestamp or
even a full date would take up too much space across the width
Nov10
Jan
2010
Jan
2011
Jan
2012
Jan
2013
Jan
2014
BK
client
type
copay
crt-dt
updt-dt
P861
C882
PPO
$20
Jan10
Aug10
BK
P861
ver-dt
client
type
copay
del-flg
N
N
N
Jan10
C882
C882
C882
HMO
$15
P861
P861
May10
HMO
$20
$20
Aug10
PPO
Figure 4.5 A Logical Delete Version Table: Before the Delete Transaction.
 
Search WWH ::




Custom Search