Course: Data Science and Database Technologies
Source: Distributed Database Management Systems, local path 19-DistributedDatabases.pdf, 76 PDF pages. The source displays the Data Base and Data Mining Group (DBMG) mark; no individual lecturer name is printed on the slides. Lecture number 19 follows the supplied filename identifier.

Lecture summary

Distributed DBMS architectures spread data and computation across networked machines to improve performance, availability, and reliability, spanning 2-tier and 3-tier client/server systems (Compile & Go vs. Compile & Store), distributed database systems with autonomous cooperating servers, data replication, parallel architectures, and data warehouses. In a distributed database, logical tables are split via horizontal (, non-overlapping rows rebuilt by union), vertical (, overlapping on the primary key and rebuilt by natural join), or mixed fragmentation—satisfying completeness and correctness—and mapped across nodes via non-redundant or redundant allocation schemas. Depending on how much distribution is hidden from the programmer, queries run under fragmentation, allocation, or language transparency.

Client work is classified into four levels of server coordination: remote request (read-only, one server), remote transaction (any SQL, one server), distributed transaction (one server per SQL statement, multiple servers overall), and distributed request (a single SQL statement spans multiple servers, requiring distributed query optimization and uniquely supporting fragmentation transparency). Guaranteeing global atomicity across node crashes, lost messages, and network partitions requires the Two-Phase Commit (2PC) protocol between a coordinator (Transaction Manager, TM) and participants (Resource Managers, RMs). Once an RM logs Ready in Phase I, it enforces WAL and Commit Precedence, holds locks, and loses local autonomy through an uncertainty window until the Global decision arrives in Phase II; recovery handles RM crashes via a third READY list and remote recovery requests, TM crashes by aborting Phase I or repeating Phase II, and network failures by aborting Phase I or repeating Phase II.

To support interoperability across heterogeneous DBMSs, X-Open-DTP standardizes the TM and XA interfaces and introduces two 2PC optimizations—Presumed Abort (eliminating synchronous writes for Prepare, Global abort, and Complete while keeping Global commit, Ready, and Commit synchronous) and Read Only (skipping Phase II for read-only RMs)—alongside operator-triggered heuristic decisions that release blocked locks at the risk of losing atomicity. Finally, parallel DBMSs boost efficiency via inter-query parallelism (OLTP, 100–1000 tps) or intra-query parallelism (OLAP complex subqueries and pipelining), evaluated using standardized TPC benchmarks (TPC-C/E, TPC-H/DI/DS, TPCx-HS).

Learning route

  1. Revisit prerequisites: DBMS Architecture and Query Processing, Two-Phase Locking and Strict 2PL, and Warm Restart Problem Solving and Cold Restart.
  2. Read Distributed Architectures Fragmentation Allocation and Transparency for 2-tier/3-tier client-server, SQL execution modes, portability vs. interoperability, fragmentation, allocation schemas, and transparency levels.
  3. Read Distributed Transaction Classification and Two-Phase Commit for the four transaction classes, distributed ACID, the 2PC protocol, the uncertainty window, and RM/TM/network failure recovery.
  4. Read X-Open-DTP Optimizations Parallel DBMS and TPC Benchmarks for X-Open-DTP (TM/XA interfaces, Presumed Abort, Read Only, Heuristic Decision), parallel DBMS modes, and TPC benchmarks.

Source map

PDF pagesMaterial
1–6Distributed architecture families (Client/Server, DDBMS, Replication, Parallel, Data Warehouses), advantages, portability vs. interoperability
7–11Client/Server 2-Tier vs. 3-Tier architectures and SQL execution (Compile & Go vs. Compile & Store)
12–14Distributed database systems: local autonomy, geographical localization, data availability, and scalability
15–24Distributed database design: horizontal, vertical, and mixed fragmentation (Employee examples), completeness/correctness, non-redundant vs. redundant allocation
25–29Transparency levels (Supplier example): fragmentation, allocation, and language transparency
30–36Transaction classification (remote request, remote transaction, distributed transaction, distributed request) and Account transfer examples
37–40Distributed DBMS technology: distributed ACID properties, distributed query optimization, and failure causes
41–57Two-Phase Commit (2PC): TM and RM roles, separate logs (Prepare, Global commit/abort, Complete, Ready), Phase I & II sequence, and uncertainty window
58–60Failure recovery in 2PC: participant (RM) READY list, coordinator (TM) crash recovery, and Phase I vs. Phase II network failures
61–69X-Open-DTP: TM and XA interfaces, Presumed Abort, Read Only, Heuristic Decision, and full TM/XA call flow
70–73Parallel DBMS: multiprocessors/clusters, inter-query (OLTP) vs. intra-query (OLAP) parallelism
74–76DBMS benchmarks standardized by TPC: TPC-C/E, TPC-H/DI/DS, and TPCx-HS

Worked examples from the source

1. Horizontal vs. vertical fragmentation of Employee (Slides 18, 20)

For Employee(Emp#, Ename, DeptName, Tax):

  • Horizontal (Slide 18): ; rebuilt via Union (fragments do not overlap).
  • Vertical (Slide 20): , ; rebuilt via Natural Join (fragments overlap on the primary key Emp#).

2. Transparency levels on Supplier (Slides 26–29)

With S1 (City='Torino') at S1@xxx.torino.it and S2 (City='Roma') at S2@xxx.roma1.it and S2@xxx.roma2.it:

  • Fragmentation transparency: FROM S (fragments and nodes hidden).
  • Allocation transparency: FROM S1 then IF (NOT FOUND) ... FROM S2 (fragments named, node/replica hidden).
  • Language transparency: FROM S1@xxx.torino.it then FROM S2@xxx.roma1.it (both fragment and specific replica named).

3. Classifying Account transfers (Slides 34–36)

With A1 (Acc# < 10000) on Node 1 and A2 (Acc# >= 10000) on Node 2:

  • Updating Account (Acc#=3000 and Acc#=13000) → Distributed request (relies on fragmentation transparency).
  • Explicitly updating A1 (Acc#=3000) and A2 (Acc#=13000) → Distributed transaction.
  • Explicitly updating only A1 (Acc#=3000 and Acc#=9000) → Remote transaction.

(See Distributed Transaction Classification and Two-Phase Commit for the full 2PC trace, failure recovery cases, and an added session practice classification labeled as outside the PDF.)

Revision prompts

  • Compare 2-tier vs. 3-tier client/server and Compile & Go vs. Compile & Store.
  • Contrast horizontal and vertical fragmentation on relational operators, overlap rules, and reconstruction, and verify completeness and correctness.
  • Rewrite a query across fragmentation, allocation, and language transparency and map each to the four transaction classes.
  • Trace 2PC Phase I and Phase II messages and log records, mark the uncertainty window, and trace RM crash (READY list), TM crash, and Phase I/II network failures.
  • Explain X-Open-DTP’s Presumed Abort (including which log writes stay synchronous and why), Read Only, and Heuristic Decision.
  • Contrast inter-query vs. intra-query parallelism and match TPC-C/E, TPC-H/DI/DS, and TPCx-HS to OLTP, OLAP, and Big Data workloads.

Source and scope

Data Base and Data Mining Group (DBMG), Distributed Database Management Systems, local path 19-DistributedDatabases.pdf, 76 PDF pages. This note paraphrases and organizes the source material; added study examples in the linked concept notes are labeled explicitly.