Databse Amnagement System
Computers and Technology
Submitted By ashen
1. What is a transaction? What are its properties? Why are transactions important units of operation in a DBMS? As defines by the Elmasri and Navathe, Transaction is a sequence of operations that performs logical unit of operations on a database which include one or more operations as insert, delete, update and modification, Transaction is a executing program, the boundaries of a transaction is define as the explicit begin of transaction and end of transaction. Read-only transaction performs only retrieve data from the database and the Read- write operation includes both retrieving and updating transactions. (Elmasri and Navathe 2010 p.745) The properties of a transaction is define as ACID properties as below, Atomicity, Consistency, Isolation and Durability Transaction is the executing program that executes the operations on the database as read(x), write (x) ,so the transactions plays a vital role among database operations.
2. Draw a state diagram and discuss the typical states that a transaction goes through during execution.
Figure1. State Diagram of a Transaction Source: Author Begin transaction: This indicates the beginning of a transaction Active phase: in this phase the running of the database operations or write sql queries for perform the tasks is done Partially committed: After performs the needed operations the transaction indicates end state and come to the phase partially committed and store in the buffer but not permanently. Committed: If the transaction was successfully executed it comes to the commit state and indicates the database that the operation was success.
Fail : if any failure occur during the transaction before committed it comes to the fail state. The system failures can occur as transaction, system and media failures. Terminate: after successfully committed or the rollback after the failures finally it indicate the...