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
What are called multilevel indices? Indices with two or more levels are known as multilevel indices.

A buyer for a large department store chain must place orders with an athletic shoe manufacturer six months prior to the time the shoes will be sold in the department stores. In par

Mention the purpose of SID and SOD lines SID (Serial input data line): It is an input line by which the microprocessor accepts serial data. SOD (Serial output data line)

What are the advantages and disadvantages of merging an association into a class?  Advantages: i)  Less number of tables ii) Faster performance due to the fewer tables

What was the method in which records are physically stored in a specified order according to a key field in each record ? A method in which records are physically stored within

What is the use of with clause in SQL? The with clause gives a way of defining a temporary view whose explanation is available only to the query in which the with clause occurs

A database to track your progress in your college program will track your progress towards graduation! A database that has information containing the classes that you have taken, c

What is Oracle databse structure? Oracle database structure: The relational model has three main aspects: Structures: Structures are well-defined objects which store th

Fourth Normal Form (4NF) When attributes in a relation have multi-valued dependency, further Normalization to 4NF and 5NF are needed. Let us first find out what multi-valued d

What is Secondary Index While making the index, generally the index table is kept in the primary memory (RAM) and the main table, because of its size is keeps in the secondary