Week 3 - ACID Properties Flashcards
What is a transaction?
It is basically user programs that either read or write data to the database system
Can you have multiple transaction running at the same time?
Yes
How to obtain Concurrency with transactions
Using interleaves to execute the transaction but leave the database in a consistent state
Atomicity
All or nothing
Consistency
no violations of integrity constraints
think foreign keys, primary keys..etc, data replication etc
Isolation
concurrent changes invisible => serializable
Durability
committed updates persist
Which of the following describes the atomicity principle of database transactions?
1) A database can only serve one user at a time.
2) All of the components of a transaction run in their entirety, or none of them run at all.
3) A database can only process one query at a time.
4) A database can only process one transaction at a time.
2) All of the components of a transaction run in their entirety, or none of them run at all.
Which of the following describes the isolation principle of database transactions?
1) All of the components of a database transaction run in their entirety, or none of them run at all.
2) A database management system can only process on query at a time.
3) A database management system can process multiple transactions simultaneously.
4) Each transaction runs as if there is no other transaction running
4) Each transaction runs as if there is no other transaction running
What is a sequence of reads and writes from/to a database called?
1) Process
2) Program
3) Transaction
4) Information
3) Transaction
How does a database achieve concurrency?
1) By processing transactions as they come in.
2) By interleaving transactions.
3) By processing transactions at the same time.
4) By putting transactions in a queue.
2) By interleaving transactions.
What are the four principles of database transactions?
1) Atomicity, Concurrency, Isolation, Durability
2) Atomicity, Consistency, Isolation, Durability
3) Atomicity, Consistency, Integrity, Durability
2) Atomicity, Consistency, Isolation, Durability
Which of the following describes the atomicity principle of database transactions?
1) All of the components of a transaction run in their entirety, or none of them run at all.
2) A database can only process one transaction at a time.
3) A database can only process one query at a time.
4) A database can only serve one user at a time.
1) All of the components of a transaction run in their entirety, or none of them run at all.