Versioning Maintenance Algo' - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Versioning Maintenance Algo'

Description:

Versioning Maintenance Algo. CS2002. Spring 2004. View Holder. Data Structure ... View holder maintains a superview of the info required by MH ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 22
Provided by: qing5
Category:

less

Transcript and Presenter's Notes

Title: Versioning Maintenance Algo'


1
Versioning Maintenance Algo.
  • CS2002
  • Spring 2004

2
View Holder
3
Data Structure
  • Tuple Version List(TVL)

4
Example 1
5
Example 1
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
View Holder Roles
  • Holder-as-Proxy
  • View holder only stores the latest version
  • Holder-as-Buffer
  • View holder has a full replication of the views
    currently in use
  • Holder-as-Cache
  • View holder maintains a superview of the info
    required by MH
  • Our example is in the Holder-as-Cache role

10
Garbage Collection
  • Proposition 1
  • If a tuple does not belong to a version i then it
    will not belong to any version j for all j gt i
  • We keep a record of MaximumVersionNumber.
  • If MaximumVersionNumber lt VN and the tuple is
    not a part of the version VN
  • Then we can delete the tuple

11
Delete a Version
If MH doesnt need version 2, then version 4 will
be the oldest available version. Although
MaximumVersionNumber 1 and VN 4,
MaximumVersionNumber lt VN, however, we cannot
delete version 1 since it is a part of version 4.
If version 1 is not required by version 4, we
can remove it safely.
12
Life cycle of a tuple
MVNL support multiple versions by using Time
Travel
deletion timestamp
insertion timestamp
13
Example 2
1. Insert an order with orderkey 12345
2. Update to this entry from pending to completed
3. Delete the entry
14
Mapping logical to physical operations
is a private version number counter that is used
by the maintenance process
15
Garbage collection
  • Delete the tuples that have been marked as
    deleted, but do not belong to a version that is
    currently being used by a reader
  • Delete from R where Tmax lt Tkill
  • Tkill is the highest version number that is not
    being accessed by any reader

16
From 2VNL to nVNL
  • They are all horizontal redundancy
  • Modification of relation schema is similar
  • Allocate space for 1 vs n-1 versions in every
    tuple

17
From Horizontal to Vertical
  • MVNL is vertical redundancy
  • Both enable user queries to run while the
    warehouse is being updated
  • MVNL, no limit to the number of maintenance
    transactions a query can overlap with during its
    execution

Concurrent Execution MVNL
18
What can we do with MVNL?
We are here!
19
  • In view holder, one has to have knowledge of the
    application domain and decide on the set of
    updateable attributes
  • CREATE TABLE Fixed_Attributes(tupleID, city,
    product)
  • CREATE TABLE Updatable_Attributes(tupleID, VN,
    total_sales)
  • CREATE TABLE Latest(operation, city, product,
    data, total_sales)

20
  • From 2VNL to MVNL?
  • In 2VNL
  • When a maintenance transaction is updating the
    tuples, only the current version held in
    total_sales is available to readers
  • When there is no maintenance transaction
    executing, both the previous and current versions
    can be read

21
  • Can we just send modified attribute to clients?
  • Keep LatestInUsed flag
  • Storage overhead
  • Concurrency performance
  • Garbage collection
Write a Comment
User Comments (0)
About PowerShow.com