Transcript PPT

Relaxed Currency and Consistency:
How to Say “Good Enough” in SQL
H. Guo, P. Larson, R. Ramakrishnan, J. Goldstein
Presented by Mike Nie
Background-1
• Using asynchronous copies technique
is common because they are good for:
• scalability
• performance
• availability
Background-II
• The way asynchronous copies
technique works:
•
•
•
Replicate data over a number of database systems
User interact with replicas to balance the workload of the
entire system
Data update over the entire system is not in the same
scope the transactions; the system will propagate the
update later for the purpose of better respond time
Motivation
• Currently there is NO way for user to
express “freshness” in SQL.
• Database system can’t respond well
because queries are not explicit, even
though it can easily keep track how
current its data is.
Currency and Consistency
• Currency: how fresh the data is in
replica database system
• Consistency: whether or not two replica
tables correspond to the same
snapshot
• e.g. book_copy and review_copy
C & C Syntax in SQL
• A C & C Clause occurs last in SFW
block and follow the same scoping rule
as the Where clause
• New clause can reference tables
defined in current and outer SFW
blocks
Single-Block Query
Multi-Block Query
Implementation-I
• Integrate C & C in MTCache
Implementation-II
• Normalizing C&C Constraints
• Transform C&C clause to a set of
tuples, e.g. C =
{<b1,S1>,<b2,S2>,...,<bn,Sn>}
• Compile-Time Consistency Checking
• Integrate consistency checking into
SQL optimizer
Implentation-III
• Compile-time consistency
checking(cont.)
•
e.g. checking if Reserves and Sailors belong to
the same mutually consistent group.
Implementation-IV
•
Run-time currency Checking
•
•
whether exist a copy in locate that is
satisfy currency bound
choose plan based on cost
Experiments
• Query Optimization Experiments
• Workload Distribution
• Overhead of Currency Guards
Conclusion
• Given such an explicit syntax user can
specify C&C constraints in SQL
• System can respond well given such an
explicit requirement
• Questions and Comments