Principles Of Distributed Database Systems Exercise Solutions May 2026
Principles of Distributed Database Systems – Exercise Solutions
Part 1: Fragmentation & Allocation
Exercise 1.1 – Horizontal Fragmentation
Given:
Relation EMPLOYEE(EID, Name, Dept, Salary) with two sites:
Exercise 3.2: Timestamp Ordering – Write Rule Conflict
Problem:
Given TS(T1)=10, TS(T2)=20. At site X, data item D has write_TS=5, read_TS=5. T2 issues write(D). T1 issues write(D) later. Apply basic timestamp ordering (TO) rules. T1 issues write(D) later
Step 2 – Ensure completeness and reconstruction:
Both fragments contain ProjID (the join key). The global relation is reconstructed as V1 ⨝ V2. The global relation is reconstructed as V1 ⨝ V2
Step 3: Send $R'$ to Site 2 (if result needed there) or proceed. they know everyone voted YES
Question: Propose a vertical fragmentation.
Summary Table of Key Exercise Principles
| Topic | Core Principle | Classic Pitfall | |-------|----------------|------------------| | Fragmentation | Horizontal: predicates; Vertical: key preservation | Lossless join not ensured | | Query optimization | Semi-join reduction before full join | Ignoring transmission cost | | Concurrency control | Distributed 2PL + deadlock detection | Circular wait across sites | | Commit | 2PC: prepare → commit | Blocking if coordinator crashes | | Replication | Read/write quorums: R+W > N | Underestimating quorum intersection |
If the coordinator crashes now, the surviving participants can communicate. If any participant has received "Pre-Commit", they know everyone voted YES, so they can safely elect a new coordinator and proceed to Commit. If no one received "Pre-Commit", they know it is safe to Abort.