Advanced Databases COPY Flashcards
(101 cards)
What does reliability in a system refer to?
The ability of a system to maintain data integrity and consistency and to recover from failures.
What is Durability in the context of transactions?
Ensures that once a transaction is committed, the changes to the database are persistent.
Define Atomicity.
Requires that for any transaction, either all operations are executed successfully, or none are.
Why are logging and recovery mechanisms important?
They are vital for achieving durability and atomicity.
What does <start T>
indicate?
Transaction T has started execution.
What does <commit T>
mean?
Transaction T has completed successfully and will make no further changes to database items.
What does <abort> signify?</abort>
Transaction T could not complete successfully. No changes made by T will be copied to disk.
What is the role of the coordinator in 2PC?
Involves a coordinator and one or more worker nodes to ensure atomicity of transactions.
Describe the Voting Phase in 2PC.
Coordinator sends a ‘prepare T’ message to all worker nodes, which execute their part and send back a ‘vote-commit T’/’vote-abort T’ message.
What happens in the Decision Phase of 2PC?
Coordinator analyzes votes from workers and makes a commit or abort decision.
What is a Commit Decision?
If all workers vote-commit, the coordinator commits the transaction and sends commit messages to all workers.
What is an Abort Decision?
If any worker votes-abort, the coordinator aborts the transaction and informs all workers.
What triggers the Termination Protocol?
Activated when a timeout occurs.
What is the Cooperative Termination Protocol?
Assumes participants are aware of each other and tries to find out the coordinator’s decision after a timeout.
What is the Recovery Protocol?
Initiated when a coordinator or participant restarts after a crash.
Define Presumed-Abort variant of 2PC.
Allows the coordinator to forget about transactions if the global decision is to abort.
What is the Presumed-Commit variant?
Assumes that if no information about a transaction is in memory, it must have been committed.
Fill in the blank: A log is a _______.
persistent, append-only record of changes.
True or False: The Voting Phase is the second phase of 2PC.
False.
What does the <ready> log record indicate?</ready>
It indicates that a worker is ready to commit or abort changes locally.
What is a distributed system?
A system consisting of multiple machines that are far away from each other, controlled by the same organization, typically in different data centers.
What is a characteristic of a distributed system?
Characteristics include:
* Multiple machines (>50)
* Homogeneous data format (relational)
* Same hardware across machines
* No reliance on a central site.
What is the goal of fragmentation in a distributed system?
To break down large databases into smaller, more manageable units.
What are the requirements for fragments in fragmentation?
The fragments should be:
* Disjoint
* Complete.