Transaction Management Flashcards
What is a transaction?
A transaction is an operation (or operations) onto a database such as a write operation.
What is the purpose of transactions having the atomicity property?
Atomicity is the property that a transaction is conducted with no intermediate steps. This means that if the transaction fails, all operations in the transaction are cancelled meaning the database returns to its state pre-transaction. Thus, there is no room for data inconsistency errors.
What is the acronym for the 4 transaction properties? Define each property…
Atomicity : A transaction with multiple operations is conducted in a single unit. This helps prevent conflicting operations.
Consistency : Transactions act within the constraints of the database.
Isolation : Transactions are conducted in isolation of one another, meaning they can occur concurrently.
Durability : Transactions maintain regardless if system crashes.
Define scheduling in regards to database transactions…
Scheduling is the way in which concurrent transactions are conducted on a database
What are the 2 types of schedule? Define each..
Serial : Concurrent operations are not interleaved. Not recommended.
Non serial : Concurrent operations are interleaved.
Which type of scheduling is preferred?
Non-serial is preferred.
What are the 2 main desired properties of a schedule?
Serializability and Recoverability
What is the purpose of serializability?
Serializability ensures atomicity in order to prevent conflicting operations.
How do we test for serializability?
- Create a precedence graph.
- Test for cycle.