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
Use Access 2007 to create a database called UniLib.mdb. - this file should be created on your personal drive at the university (or C: if you're using Access 2007 at home) and t

sir, could anybody help me in getting complete information about the mentioned topic

Software failures :  In such cases, a software error abruptly stops the implementation of the current transaction (or all transactions), therefore leading to losing the state of pr

What are the benefits of OOA technology? Using OOA technology can produce many benefits, such as:  i) Reusability of code  ii) Productivity is gained through direct mappi


What are the Issues when Selecting a Database Issues when Selecting a Database Storage space requirement: A database requires about triple storage space of the actua

Define the term- Actors and Data Stores Actors: An actor is the active object which drives data flow graph by producing or consuming values. Actors are attached to inputs a

From SAD to OOAD (Structured Analysis and Design (SAD) to Object Oriented Analysis and Design (OOAD). We will find here how we can map various models in SAD to different model

Northwind Pty Ltd sells a variety of food products throughout the world. They want to use the reporting features of SAP''s Business Information Warehouse to better understand thei

Difference between LEFT OUTER JOIN and RIGHT OUTER JOIN In left outer join tuples from the left-hand-side relation which do not match any tuple in the right-hand-side relation