Transaction

Introduction

Get a price quote
Type of service
Type of assignment
Writer level
Urgency
Number of pages
We do NOT use AI
to write content

Transaction is the action or series of actions which is carried out by a single user or an application program (Newcomer, 2009).This results to reading or updating the content of a database. An example of a transaction is :

Begin T

Read (x)

X=x+30

Write(x)

End T

Where T is the transaction

Transaction processing on the other hand is the means of facilitating a series of actions which consist of reading and writing of the database. A system or software that is developed to ensure that transactions being carried out are successful is called transaction processing system. A transaction processing system facilitates various techniques to ensure that there is no conflict and concurrency is enhanced .Since a transaction aims at transforming a database from one state to another, at any one a transaction can either be active, committed or aborted. An active transaction means that the transaction is already in progress. A committed transaction is the one that has already executed successfully while an aborted transaction is the one that its execution is not successful. A committed transaction makes the database reach a new consistency stage. If on the other hand the transaction was not success, in other words the transaction was aborted; the database must be restored to the previous state the database was before the transaction. This is called rolling back which means undoing the transaction. Apart from the obvious states of a transaction there exist partially committed transaction and also fail state .The former means that the final statement has already been executed but has violated an integrity constraint and therefore has to be aborted, while the latter means that an active transaction has been terminated. A deadlock occurs when two or more processes are waiting for a resource which is being held by another process (Emmerich, 2000).

                                                                      Discussion                             

Solution to question 1

           Transaction ID

Affected table

Modification

1

ServiveRequest                       

added

2

Marina and marinaslip

Changed(both)

3

Owner and MarinaSlip

Changed(both)

4

MarinaSlip and Owner

Changed(both)

 Solution to question 2

Transactions 1 and 3 would be used to restore the database because they had already committed and permanent changes had been made before the failure.

Transactions 2 and 4 would have to be re-entered by the user because changes had not been made to the database before the failure.

Solution question 3

Transactions 3 and 4 would cause deadlock because they are working with the same values. It is therefore important to make sure that they both start at different times. This means that these two transactions will never commit.

Get 15% off your 1st order
Use quality15code promo discount code
Speech and Language Effects of Child Abuse
Related essays
to use our service and receive 10% from every order they place
Chat with Support