Distributed unit of work (DUOW): Does it allow the SQL statements inside a single unit of work to reference multiple remote DBMS locations under one transactional context?

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
Distributed transactions extend ACID guarantees across multiple databases or servers. A “distributed unit of work” addresses whether multiple remote locations can be involved within one logical transaction boundary.



Given Data / Assumptions:

  • SQL statements may target more than one server or catalog.
  • A transaction manager or coordinator is available (for example, two-phase commit).
  • ACID properties must hold across all participants.


Concept / Approach:
A distributed unit of work groups statements across nodes so they either all commit or all roll back together. Coordinators manage prepare/commit phases to guarantee atomicity and durability. This enables cross-database updates like “debit here, credit there” without inconsistent outcomes.



Step-by-Step Solution:

Begin a transaction (explicit or implicit depending on DBMS).Execute statements referencing multiple remote locations.Coordinator invokes prepare on all participants, ensuring readiness.Commit if all agree; otherwise roll back everywhere.


Verification / Alternative check:
Simulate failure of one participant during the prepare phase; the coordinator should force a global rollback, demonstrating atomic behavior across sites.



Why Other Options Are Wrong:

  • “Incorrect” contradicts the definition of DUOW.
  • Limiting to read-only or tying to autocommit/bandwidth misunderstands that the key is a transaction coordinator and protocol, not read/write status or network speed.


Common Pitfalls:
Ignoring failure modes and idempotency; ensure participants support recovery logs and in-doubt resolution to avoid blocked transactions.



Final Answer:
Correct

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion