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 is the use of unique function? UNIQUE function: If UNIQUE is specified then only unique values are used to computed the mean.

Explain Recursive relationship type? Recursive relationship type: A recursive relationship is one in that the similar entity participates more than once in the relationship

What is storage manager?  A  storage  manager  is  a  program  module  that  gives  the  interface  between the Low level data  kept in a database and the application programs

Explain Interblock gap? Interblock Gap - A track of a disk is separated into equal-sized disk blocks. Blocks are separated through fixed-size gaps, called as interblock gaps th

sql is relationally complete-justify

Replicating Data One approach that may support efficient access to dissimilar applications as above may be to give access to every of the applications from dissimilar replicate

A software contract and consultancy firm maintains details of all the various projects in which its employees are currently involved. These details comprise: Employee Numbe

Serialisable Schedules: If the processes of two transactions conflict with each other, how to verify that no concurrency related problems have happened? For this, serialisability t

Explain in detail the consistency model of the distributed file system you studied (GFS or AFS). Present the consistency model chosen and how it was achieved through design. Clarit

CAN SOMEONE HELP ME WITH ENTITY DIAGRAMS IN FIRST NORMAL FORM?