How do distributed transactions differ from local transactions?
- Concurrency and Durability
- Consistency and Recovery
- Isolation and Atomicity
- Scope and Participants
Distributed transactions involve multiple participants and a wider scope, whereas local transactions are limited to a single resource or database.
What is two-phase commit protocol in the context of transaction management?
- A protocol for authentication
- A protocol for coordination
- A protocol for data retrieval
- A protocol for voting
The two-phase commit protocol is a coordination protocol involving a voting phase and a decision phase to ensure distributed transaction consistency.
How do savepoints work within a transaction?
- Allow for partial rollback
- Commit the entire transaction
- Isolate a transaction
- Terminate the transaction
Savepoints allow for partial rollback within a transaction, providing a way to undo part of the transaction without affecting the entire operation.
In SQL, the command ________ is used to permanently save changes made by the current transaction.
- BEGIN TRANSACTION
- COMMIT
- ROLLBACK
- SAVEPOINT
The COMMIT command in SQL is used to permanently save changes made by the current transaction.
The ability of a transaction to operate independently of other transactions is known as __________.
- Atomicity
- Consistency
- Durability
- Isolation
The ability of a transaction to operate independently of other transactions is known as Isolation.
A transaction's property ensuring that either all its operations are completed successfully, or none are, is known as _________.
- Atomicity
- Consistency
- Durability
- Isolation
A transaction's property ensuring that either all its operations are completed successfully, or none are, is known as Atomicity.
The concept of ________ allows multiple users to make changes to the database without affecting each other.
- Concurrency Control
- Consistency Management
- Isolation
- Transaction Control
The concept of Concurrency Control allows multiple users to make changes to the database concurrently without affecting each other, ensuring data integrity and consistency.
In a distributed system, when two databases must be updated as part of a single transaction, which transaction management technique is most appropriate?
- Isolation (I)
- Optimistic Concurrency Control (OCC)
- Pessimistic Concurrency Control (PCC)
- Two-Phase Commit (2PC)
The Two-Phase Commit (2PC) is most appropriate for managing transactions in a distributed system involving updates to multiple databases, ensuring atomicity and consistency across the distributed environment.
The isolation level that allows neither dirty reads nor non-repeatable reads is called _________.
- Read Committed
- Read Uncommitted
- Repeatable Read
- Serializable
The Serializable isolation level ensures neither dirty reads nor non-repeatable reads, providing the highest level of isolation.
How should a system handle a situation where a transaction is interrupted due to a system failure?
- Commit the partial updates
- Ignore the interruption and proceed
- Retry the interrupted transaction
- Rollback the interrupted transaction
If a transaction is interrupted due to a system failure, the system should rollback the interrupted transaction to maintain consistency and avoid partial updates that could lead to data inconsistencies.