Title: Versioning Maintenance Algo'
1Versioning Maintenance Algo.
2View Holder
3Data Structure
4Example 1
5Example 1
6(No Transcript)
7(No Transcript)
8(No Transcript)
9View 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
10Garbage 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
11Delete 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.
12Life cycle of a tuple
MVNL support multiple versions by using Time
Travel
deletion timestamp
insertion timestamp
13Example 2
1. Insert an order with orderkey 12345
2. Update to this entry from pending to completed
3. Delete the entry
14Mapping logical to physical operations
is a private version number counter that is used
by the maintenance process
15Garbage 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
16From 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
17From 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
18What 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