Principles Of Distributed Database Systems Exercise — Solutions
Introduction
- Move R1(100) to T3 site: 100. Join R1(100) with T3(2000) → size ~ 200 (sel=0.1? Actually R1 unique key → size=100). Then move 100 to S2 site: +100. Total=200.
Answer: Max failures = 1 (with write quorum 4, if 2 fail, only 3 remain, insufficient for write). Introduction
Consider a distributed database system that stores information about customers, orders, and products. The database is fragmented into three fragments: Move R1(100) to T3 site: 100
Design a distributed query to retrieve all tuples from R1 and R2. Answer: Max failures = 1 (with write quorum
Exercise 3: Distributed Transaction Management
3. Reason about ordering and visibility
- For concurrency/transactions: use happens-before (Lamport clocks) or vector clocks to argue about causality.
- For serializability: construct or reason about the conflict graph (precedence graph). Show cycles → not serializable; acyclic → serializable.
- For linearizability: map each operation to an atomic point in a global timeline respecting real-time order.
Assume PROJ is horizontally fragmented by location:
2. Distributed Query Processing – Exercises
Exercise 2.1: Cost-Based Join Order Selection
Problem:
Three fragments R1 (size 100 tuples), S2 (size 500 tuples), T3 (size 2000 tuples) at three different sites. Compute the cheapest join order for R1 ⨝ S2 ⨝ T3. Assume transmission cost = 1 unit per tuple, and local join cost ignored.