Principles Of Distributed Database Systems Exercise Solutions |work| Jun 2026

Use a quorum of 15 nodes (a strict majority + 2) to rebuild the true sequence of events. The majority spoke: Node Gamma had acted alone. The withdrawal from account #LK-99 was invalid.

2PC protocol guarantees atomicity.

Consider a distributed database system that stores information about employees and departments. The database is distributed across three sites: Site A, Site B, and Site C. Each site has its own local database and is autonomous.

Each fragment is replicated at two sites: Site A and Site B.

Data fragmentation splits a global database relation into smaller logical pieces (fragments) stored across different network nodes. Exercises in this domain typically test your ability to execute horizontal or vertical fragmentation without losing data integrity. Horizontal Fragmentation (Primary & Derived) Use a quorum of 15 nodes (a strict

before shipping it over the network by filtering out rows that will not match any row in

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.

Option 2: (R1 ⨝ T3) then with S2

Understanding the types of transparency is crucial for designing and querying distributed databases. The main levels include: 2PC protocol guarantees atomicity

For example, if relation PROJ is horizontally fragmented as PROJ1 = σ_PNO < “P2”(PROJ) and PROJ2 = σ_PNO > “P2”(PROJ) , and the query contains PNO = “P4” , only PROJ2 can contribute because “P4” is greater than “P2”.

Most structural exam questions ask you to trace the message history of a Two-Phase Commit protocol under normal operation or node failure.

) are heavily featured in distributed database exercises because they reduce the size of relations before transferring them across a network. You need to join Relation at Site 1 and Relation at Site 2. Moving the entirety of to Site 2 is too costly. The Semijoin Solution: Project the join attribute from Site 2: Ship this projection to Site 1. on Site 1: Ship the much smaller, reduced R′cap R prime back to Site 2 to complete the final join. The Math: A semijoin program is cost-effective only if:

Global Relation (R) │ ┌──────────────────────────┼──────────────────────────┐ ▼ ▼ ▼ Fragment R1 Fragment R2 Fragment R3 (Department = 'HR') (Department = 'Eng') (Department = 'Sales') │ │ │ └──────────────────────────┼──────────────────────────┘ ▼ Reconstruction via UNION (∪) Every data item in must mapped to at least one fragment. Each site has its own local database and is autonomous

Horizontal fragmentation splits a relation into subsets of tuples based on a predicate.

If the set of simple predicates were not complete, some queries would require accessing irrelevant fragments or performing expensive joins. The set may be minimal if no predicate can be derived from the others. For example, ALLOCATION_NO=12 might be crucial for Q2 but not directly derivable from the other predicates.

Describe how the system ensures autonomy and distribution.