Learning objectives
What you will be able to explain
- Which type of failure occurs when a divide-by-zero exception causes the DBMS to halt, while the system assumes non-volatile storage contents remain uncorrupted?
- Regarding failure assumptions and recovery methods:
- The [Steal / No-Steal] policy dictates whether the DBMS allows an uncommitted transaction to write dirty pages to disk if memory is full.
- Which buffer management policy enforces Durability by requiring all updates of a transaction to be on disk before the transaction is allowed to commit?
- Identify the characteristics of the "Shadow Paging" recovery method:
- What is the fundamental rule of Write-Ahead Logging (WAL) regarding the order of disk writes?
Section 01
Which type of failure occurs when a divide-by-zero exception causes the DBMS to halt, while the system assumes non-volatile storage contents remain uncorrupted? to The [Steal / No-Steal] policy dictates whether the DBMS allows an uncommitted transaction to write dirty pages to disk if memory is full.
01
Which type of failure occurs when a divide-by-zero exception causes the DBMS to halt, while the system assumes non-volatile storage contents remain uncorrupted?
A DBMS halt from software/runtime exception with intact persistent storage is a system failure (software failure), not a media failure.
02
Regarding failure assumptions and recovery methods:
A is True because media failure destroys durable pages and needs backup restore. B is False because ordinary crash assumptions keep disk intact. C is False because shadow paging avoids in-place updates by writing new page versions.
03
The [Steal / No-Steal] policy dictates whether the DBMS allows an uncommitted transaction to write dirty pages to disk if memory is full.
Steal policy allows flushing dirty pages belonging to uncommitted transactions when buffer pressure requires eviction.
Section 02
Which buffer management policy enforces Durability by requiring all updates of a transaction to be on disk before the transaction is allowed to commit? to What is the fundamental rule of Write-Ahead Logging (WAL) regarding the order of disk writes?
01
Which buffer management policy enforces Durability by requiring all updates of a transaction to be on disk before the transaction is allowed to commit?
Force policy guarantees durability at commit by requiring updated pages to reach disk before commit completes.
02
Identify the characteristics of the "Shadow Paging" recovery method:
Shadow paging commonly uses Force + No-Steal, keeps master/shadow page tables, and suffers from fragmentation plus garbage-collection overhead; it does not rely on complex redo/undo replay.
03
What is the fundamental rule of Write-Ahead Logging (WAL) regarding the order of disk writes?
WAL enforces log-before-data ordering: the log record must be stable before the corresponding updated page can be written to data storage.
Section 03
In the context of WAL, the condition [pageLSN <= flushedLSN / pageLSN > flushedLSN] must be satisfied before a data page is written to disk. to Why are WAL log records typically faster to write than data pages in Shadow Paging?
01
In the context of WAL, the condition [pageLSN <= flushedLSN / pageLSN > flushedLSN] must be satisfied before a data page is written to disk.
Before flushing a page, all log records up to that page's latest update must already be durable, i.e., `pageLSN <= flushedLSN`.
02
About logging schemes:
Answers: A: True, B: False (Physiological is used by ARIES), C: True
03
Why are WAL log records typically faster to write than data pages in Shadow Paging?
Log writes are typically smaller and sequential, while data-page writes can be larger/random. Sequential append behavior makes WAL logging faster in normal operation.
Section 04
Which phase of the ARIES recovery process identifies which transactions were active at the time of the crash? to During the Undo phase, what does the DBMS use to ensure that the same undo operation is not performed twice if the system crashes again?
01
Which phase of the ARIES recovery process identifies which transactions were active at the time of the crash?
ARIES Analysis reconstructs transaction and dirty-page state at crash time and classifies winner/loser transactions.
02
The Redo phase in ARIES is characterized as "repeating history," meaning it replays [Only committed transactions / All log actions] in a forward direction.
ARIES Redo repeats history by replaying all relevant actions (not only committed ones) so the database is reconstructed exactly to pre-crash state before undoing losers.
03
During the Undo phase, what does the DBMS use to ensure that the same undo operation is not performed twice if the system crashes again?
Undo writes CLRs so recovery is restartable: if another crash happens mid-undo, already-undone actions are known and not undone repeatedly.
Section 05
Which of the following are valid criteria for triggering a checkpoint? to [Strong / Weak] scaling, described by Amdahl's Law, refers to the rate at which solution time varies with processors for a fixed total problem size.
01
Which of the following are valid criteria for triggering a checkpoint?
Practical checkpoint triggers include elapsed time, log-growth thresholds, and controlled shutdown events. Triggering on every commit is usually too expensive.
02
Which metric describes how much faster a parallel algorithm runs on nodes compared to a sequential program?
Speedup quantifies parallel gain as `T_sequential / T_parallel`, measuring how much faster execution becomes with parallel resources.
03
[Strong / Weak] scaling, described by Amdahl's Law, refers to the rate at which solution time varies with processors for a fixed total problem size.
Amdahl-style analysis fixes total problem size and studies runtime reduction with added processors, which is strong scaling.
Section 06
About parallel architectures: to [Inter-Operator / Intra-Operator] parallelism is another name for Pipeline Parallelism.
01
About parallel architectures:
Shared-memory systems share memory (and often storage) across CPUs. Shared-nothing dominates cloud-scale designs. Shared-disk systems keep private memory per node while sharing common storage.
02
Which mode of parallelism involves multiple threads working on the same operator (e.g., parallel sort or join)?
Data parallelism means splitting one operator's workload across workers, such as parallel scan/sort/join on partitions of the same input.
03
[Inter-Operator / Intra-Operator] parallelism is another name for Pipeline Parallelism.
Pipeline parallelism runs different operators concurrently on streaming data between them, which corresponds to inter-operator parallelism.
Section 07
In a Distributed Database, what is "Network Partitioning"? to A system using ARIES crashes. The log contains: - LSN 10: <T1 BEGIN> - LSN 20: <T2 BEGIN> - LSN 30: <T1, P1, Old:5, New:10> - LSN 40: <T1 COMMIT> - LSN 50: <T2, P2, Old:100, New:200> Identify the "Winner" and "Loser" transactions.
01
In a Distributed Database, what is "Network Partitioning"?
Network partitioning is a communication failure that splits nodes into groups that cannot exchange messages, even though each side may still run locally.
02
Select the phases involved in the standard Two-Phase Commit (2PC) algorithm:
2PC consists of vote collection (prepare/vote) followed by final decision broadcast (commit/abort). Analysis and garbage collection are not core commit phases.
03
A system using ARIES crashes. The log contains: - LSN 10: <T1 BEGIN> - LSN 20: <T2 BEGIN> - LSN 30: <T1, P1, Old:5, New:10> - LSN 40: <T1 COMMIT> - LSN 50: <T2, P2, Old:100, New:200> Identify the "Winner" and "Loser" transactions.
Path of Calculation:
1. Analysis Phase: Scan log from beginning.
2. LSN 10, 20: T1 and T2 are active.
3. LSN 40: <T1 COMMIT> found. T1 is a Winner.
4. End of log: T2 has no COMMIT/ABORT. T2 is implicitly a Loser.
Result: Winners: {T1}, Losers: {T2}.
Section 08
During the Redo phase, the DBMS reads log record LSN 150 (T3 updates Page P9). The page is fetched from disk and its `pageLSN` is found to be 160. Should the update be applied? Explain. to A transaction T5 is a Loser. Its log entries are: LSN 100 (Write P1), LSN 120 (Write P2), LSN 140 (Write P1). In which order will these be processed during the Undo phase?
01
During the Redo phase, the DBMS reads log record LSN 150 (T3 updates Page P9). The page is fetched from disk and its `pageLSN` is found to be 160. Should the update be applied? Explain.
Path of Calculation:
1. Redo Logic: An operation is applied IF the LSN of the page on disk is less than the LSN of the log entry.
2. Comparison: `pageLSN` (160) < `logLSN` (150).
3. 160 is NOT less than 150.
Result: No, the update should not be applied because the page on disk already reflects a change that occurred after this log record (it is more recent).
02
A database query has a parallelizable fraction () of 80% (0.8). If you run this query on a system with 4 cores (), what is the maximum theoretical speedup ()?
Path of Calculation:
1. Formula:
2.
3.
4.
Result: 2.5.
03
A transaction T5 is a Loser. Its log entries are: LSN 100 (Write P1), LSN 120 (Write P2), LSN 140 (Write P1). In which order will these be processed during the Undo phase?
Path of Calculation:
1. Undo Phase: The log is read backwards for loser transactions.
2. The latest LSN is 140, followed by 120, then 100.
Result: LSN 140, then LSN 120, then LSN 100.
Section 09
In a WAL system, Transaction T1 updates Page P5 (assigned LSN 500). The current `flushedLSN` on disk is 480. The Buffer Manager wants to "Steal" Page P5 to make room for another transaction. What action must the DBMS take first? to A system has 50% of its workload that cannot be parallelized. According to Amdahl's Law, what is the maximum speedup possible even with an infinite number of processors?
01
In a WAL system, Transaction T1 updates Page P5 (assigned LSN 500). The current `flushedLSN` on disk is 480. The Buffer Manager wants to "Steal" Page P5 to make room for another transaction. What action must the DBMS take first?
Path of Calculation:
1. WAL Rule: `pageLSN` <= `flushedLSN` must hold before a page is written to disk.
2. Check: 500 <= 480 is False.
Result: The DBMS must flush the log records up to at least LSN 500 to stable storage before it is allowed to write Page P5 to the disk.
02
Calculate the speedup if a sequential program takes 120 seconds and a parallel version on 10 nodes takes 15 seconds. Is this speedup linear, sub-linear, or super-linear?
Path of Calculation:
1. Speedup () = Sequential Time / Parallel Time = 120 / 15.
2. .
3. Linear speedup for 10 nodes would be 10.
Result: Speedup is 8. Since 8 < 10, it is sub-linear.
03
A system has 50% of its workload that cannot be parallelized. According to Amdahl's Law, what is the maximum speedup possible even with an infinite number of processors?
Path of Calculation:
1. Formula:
2. As , .
3. . Here, .
Result: 2.0.
Section 10
Which partitioning method guarantees that an equal number of tuples are placed in each set, but provides no relationship between tuples in a set? to What is a major disadvantage of "Data Replication" in distributed databases?
01
Which partitioning method guarantees that an equal number of tuples are placed in each set, but provides no relationship between tuples in a set?
Round-robin distributes tuples evenly by placement order, giving balanced counts but no semantic grouping by key/range.
02
[Vertical / Horizontal] partitioning is used in its extreme form in column stores, where every column is a partition.
Column stores are the extreme form of vertical partitioning: attributes are separated so each column (or column group) is stored independently.
03
What is a major disadvantage of "Data Replication" in distributed databases?
Replication improves availability/read locality, but writes become more expensive due to multi-replica update propagation and stronger distributed concurrency/consistency coordination.
Section 11
A distributed transaction is coordinated by Node A. During the "Vote Collection Phase" of 2PC, Node B (a participant) crashes before responding. What is the standard outcome decided by Node A? to If a log record is 64 bytes and a data page is 4 KB (4096 bytes), how many log records can fit into the space of one data page?
01
A distributed transaction is coordinated by Node A. During the "Vote Collection Phase" of 2PC, Node B (a participant) crashes before responding. What is the standard outcome decided by Node A?
Path of Calculation:
1. 2PC Rule: Coordinator commits ONLY if ALL participants agree.
2. If a node fails or someone disagrees, the decision must be to abort.
Result: The transaction must be Aborted globally.
02
If a log record is 64 bytes and a data page is 4 KB (4096 bytes), how many log records can fit into the space of one data page?
Path of Calculation:
1. 4096 / 64 = 64.
Result: 64 records. (This illustrates why log flushing is efficient: one sequential I/O writes many records).
Knowledge check
Turn understanding into recall.
The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.