Principles Of Distributed Database Systems Exercise Solutions

Deciding where to store each fragment to minimize communication costs. How to Approach Solutions

p1 : Dept = ‘Sales’ p2 : Dept = ‘Eng’

The marketing team does not need financial or system keys. We isolate their required columns to reduce disk I/O. creates the marketing fragment ( FMktcap F sub cap M k t end-sub Correctness Rules Check

[prepare, T] — Written prior to broadcasting the PREPARE signal. Deciding where to store each fragment to minimize

executes a local abort to clean up resources, rolling back any uncommitted structural modifications made by If the coordinator later queries P3cap P sub 3 regarding transaction P3cap P sub 3

In this specific scenario, is significantly cheaper (

Coordinator P1 / P2 P3 (Crashes) | | | |--- PREPARE -------------->| | |--- PREPARE ------------------------------------------>| (Fails to vote) |<-- VOTE_COMMIT -----------| X | | X (Timeout! Aborts) | | | |--- GLOBAL_ABORT --------->| |<-- ACK -------------------| Solution & Operational Blueprint 1. Logging and State Machine Tracking creates the marketing fragment ( FMktcap F sub

Choose optimal semi-join based plan to compute R ⋈ S ⋈ T .

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.

Strict 2PL (all locks held until commit/abort) avoids this because T1 doesn’t release X lock before committing, so T2 can’t read X until T1 commits → no cycle. At site X, data item D has write_TS=5 , read_TS=5

Sort-merge preferred when:

: Defining horizontal and vertical fragments for a given schema.

During a Two-Phase Commit protocol execution, the Coordinator crashes immediately after sending a Prepare message and receiving VOTE_COMMIT from all participants. Analyze why this status leaves the participants in a blocking state, and outline the steps for a cooperative recovery protocol. Solution & Execution Flow

Both fragments contain ProjID (the join key). The global relation is reconstructed as V1 ⨝ V2 .