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
Differentiate between horizontal & mixed horizontal fragmentation?

anyone have a textbook solutions case fair, 8 edition of vol 1 ?, please give me

Probelm: (a) A distributed database (DDB) is a collection of multiple, logically interrelated databases which are physically distributed over a computer network" (i) Give a

Describe the static hash file with buckets and chaining and show how insertion, deletion and modification of a record can be performed. In static hash file organization, the wo

Discuss the term- Design Optimization  We have seen various ways of representing the objects.The fundamental design model uses analysis model as the framework for implementati

Redo Logs: Any database must have minimum two redo logs. These are the rules for the database; the redo logs record all modifies to the system objects or user objects. If any type

State the functional approach of object oriented methods Moving from a functional approach to an object oriented one needs a translation of functional model elements into objec

Economics: It is now usually accepted that it costs less to make a system of smaller computers with the equivalent power of a one large computer. It is more cost-effective to get s

What is meant by object-oriented data model? The object-oriented paradigm is based on encapsulation of data and code related to an object in to a one unit, whose contents are n

Home based assignment Consider an ORDER table with the following attributes: • Order Number (ONo),Customer Number (CNo),Customer Name (CNa),Item Number (INo),Unit Price (UP), Quant