Principles Of Distributed Database Systems Exercise Solutions !full! <ORIGINAL>

Maintaining data consistency across multiple independent nodes requires robust concurrency control mechanisms. Academic problems evaluate your understanding of locking and ordering protocols. Two-Phase Locking (2PL) variations

She spent the rest of the night scribbling notes, mapping out quorum systems and failure-aware commit protocols. The solutions weren't just lines of code; they were a blueprint for a resilient, distributed world.

Systems use a Global Conceptual Schema (GCS) that maps logical tables to physical fragments. Solutions often involve "Transparent Mapping," where the query optimizer automatically decomposes a global query into sub-queries targeted at specific nodes. This ensures that the user's SQL remains identical regardless of where the data resides. Data Fragmentation and Allocation

A distributed deadlock detector must abort one of the transactions (typically the youngest via the Wait-Die or Wound-Wait scheme) to break the cycle. 4. Distributed Reliability & Commit Protocols Two-Phase Commit (2PC) State Machine Analysis Coordinator Phase Cohort Phase 1. Sends PREPARE 1. Receives PREPARE 2. Collects Votes 2. Sends VOTE_COMMIT / VOTE_ABORT 3. Broadcasts COMMIT / ABORT 3. Executes command The solutions weren't just lines of code; they

Before fragmenting a relation $R$, the design must satisfy three rules:

Reduced Tuples=10,000×0.1=1,000 tuplesReduced Tuples equals 10 comma 000 cross 0.1 equals 1 comma 000 tuples

One designated coordinator site manages all lock requests. Problems focus on bottleneck analysis and single-point-of-failure vulnerabilities. This ensures that the user's SQL remains identical

Site 1: T1 ----> T2 --(External Wait)--> [Site 2] Site 2: T2 ----> T3 --(External Wait)--> [Site 1: T1]

Semi-join reduces cost significantly. The semi-join expression: Orders ⋉ (π_CustID(σ_City=‘Paris’(Customers)))

Horizontal fragmentation partitions a relation into subsets of tuples based on a predicate. The solutions weren't just lines of code; they

Profile update → eager replication (strong consistency). Like counter → lazy replication (eventual consistency).

Reduce Employee at Node 1 using the received DeptID s. Assume only 10% of employees match the active departments (selectivity factor ). The reduced Employee' relation has 1,000 tuples.

: Dividing relations into horizontal or vertical fragments and placing them across nodes.

| ID | Name | Age | | --- | --- | --- | | 3 | Joe | 35 | | 4 | Sarah | 20 |