Principles Of Distributed Database Systems Exercise Solutions -

Fragment1 = π_ProjID, Title, ManagerName(PROJECT) Fragment2 = π_ProjID, Budget, StartDate, EndDate(PROJECT) 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.

Upon restart, coordinator sends COMMIT to P3 (if decision logged). If no decision logged and some participant already committed (via unilateral decision), P3 must commit → but this violates 2PC’s blocking property? Actually, 2PC can block if coordinator crashes without decision. That’s why 3PC is non-blocking. Exercise 4.2: Logging – Write-Ahead Log (WAL) in Distributed System Problem: Transaction T updates items A (site1) and B (site2). Show the steps for atomic commitment using WAL and 2PC. Assume transmission cost = 1 unit per tuple,

Max failures = 1 (with write quorum 4, if 2 fail, only 3 remain, insufficient for write). Exercise 5.2: Update Propagation – Eager vs. Lazy Problem: Social media app: user profile update (need immediate consistency across all followers’ caches) vs. “like” counter (can be eventually consistent). Which replication strategy for each? Actually, 2PC can block if coordinator crashes without