What is a transaction? , Database Management System

What is a transaction?

The Transaction is a unit of data processing. For instance, many of the transactions at a bank may be withdrawal or deposit of money; transfer of money from A's account to B's account etc. A transaction would include manipulation of one or more data values in a database. Therefore, it may need reading and writing of database value. For instance, the withdrawal transactions can be written in pseudo code as:

Example:

; Suppose that we are doing this transaction for person

;  whose account number is X.

TRANSACTION WITHDRAWAL (withdrawal_amount)

start transaction

IF X exist then

READ  X.balance

IF   X.balance > withdrawal_amount THEN

 SUBTRACT withdrawal_amount

WRITE X.balance

COMMIT

ELSE

         DISPLAY "TRANSACTION CANNOT BE PROCESSED"

 ELSE DISPLAY "ACCOUNT X DOES NOT EXIST"

End transaction;

Another same example may be transmitting of money from Account no x to account number y. This transaction may be written as:

Posted Date: 3/11/2013 5:18:33 AM | Location : United States







Related Discussions:- What is a transaction? , Assignment Help, Ask Question on What is a transaction? , Get Answer, Expert's Help, What is a transaction? Discussions

Write discussion on What is a transaction?
Your posts are moderated
Related Questions
Explain Superkey Ans: A superkey is described in the relational model of database organization like a set of attributes of a relation variable for which it holds that in all re

What is meant by computing the closure of a set of functional dependency? The closure of F denoted by F + is the set of functional dependencies logically implied by F.

A database for the Service and Maintenance (SM) section of a Computer sales and service Company has to be developed. SM gives after sales service to customers. SM branch has a numb

Explain the concepts of relational data model? Relational Data Model - The relational model was first introduced through Prof. E.F. Codd of the IBM Research in the year 1970

Using Relational Algebra which query finds customers, who have a balance of over 1000 ? Using Relational Algebra Π Customer_name( σ balance >1000(Deposit)) is query to find cu

Explain the function of Object model Object model describes the classes of objects in system, including their attributes and operations which they support. The analysis object

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

What are the different kinds of database end users? Discuss the major activities of each? End-Users - End-users are the people whose jobs need access to the database for que

A constraint named less_than_20 was defined on the field date_of_birth of table student. Delete this constraint. ALTER TABLE student DROP CONSTRAINT less_than_20;

1. Identify the comparisons and exchanges made to sort the following array using the selection exchange sort technique. Note: you may not need all columns. Ori