Exercise 19: TP monitors and Transaction Protocols
Q1. Give a description in your own words of the ACID properties of a transaction.
Answer:
ACID properties of a transaction means Atomicity, Consistency, Isolation and Durability of a transaction.
Atomicity in (ACID) means the transaction have to be completed or remian the previous state. That is, for instance, in Oracle, the insert operation needs "commit" statement to add a new record. Else, we can use "rollback" statement to cancel the insert operation. We cannot save a single part of the transaction without all parts of transaction. We cannot ignore a single parts of transaction without all parts of transaction being ignored.
Consistency in (ACID) means that Data (Record) is not allowed to keep in a contradictory state and each transaction have to follow an integrity contraints. Intergrity contraints is the declaration of consistency rules. For example, I set that every employee record must have employee number in employee table and every manager must have at least one employee as a subordinate in manager table. If it is found that in the manager table manager does not have employee number and manager does not have subordinate employee, then the database
is not consistent.
Isolation in (ACID) means that each transcation is only allowed to operate independently. No simultaneous transactions can interfere with each other. If there is some intermediate results of one transaction, these results must be transparent to all other transactions. One transaction (namely, transaction-A) can be affected by other transactions only if transaction-A has been completed.
Durable in (ACID) means that once the transaction has been committed and saved, the transaction (record) must be kept permanently even if the database is crashed , restarted or failed. For instance, I insert a record in Teradata Database. After that, I reboot the UNIX and Teradata. When the system boots up again, the record is still there. Thus, Teradata Database is Durable.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment