Dividing a table into smaller parts (Horizontal/Vertical).
We have two fragments, Emp1 (at Site A) and Emp2 (at Site B). Emp1 : 1000 tuples, 10 bytes per tuple. Emp2 : 500 tuples, 10 bytes per tuple. Query: SELECT * FROM Emp1 UNION SELECT * FROM Emp2
Detect the deadlock.
Tuples(R′)=10,000×0.2=2,000 tuplesTuples open paren cap R prime close paren equals 10 comma 000 cross 0.2 equals 2 comma 000 tuples Dividing a table into smaller parts (Horizontal/Vertical)
Replacing global relations with their fragments.
To ensure the partitioning is valid, the predicates must satisfy correctness rules: completeness, reconstruction, and disjointness.
Explain how the Two-Phase Commit (2PC) protocol ensures data consistency. Solution: Phase 1: Voting Phase The Coordinator asks both Site X and Site Y to prepare. Emp2 : 500 tuples, 10 bytes per tuple
Does the user feel like they are using a single database?
: Always compare total cost of semi-join + reduced tuple transfer vs. naive transfer. Semi-join wins when join selectivity is low.
Rewriting the calculus query into an algebraic one. To ensure the partitioning is valid, the predicates
Add inter-site dependencies based on remote resource requests: (Site 1 to Site 2) (Internal relation logic/execution step) (Site 2 to Site 1) Trace the Cycle:
This article provides a structured approach to solving common exercises in this domain. We will break down solutions by topic, explain the underlying reasoning, and offer strategies to tackle problems ranging from fragmentation to distributed deadlock detection.
By mastering these mathematical and logical foundations, you move beyond rote memorization and toward designing resilient, high-performance distributed architectures.
Empty or [init, T] — No ready log entry is written because the node crashed before registering a formal vote. 2. Timeout Actions