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
) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a picto

What are segments in oracle? Segments - Each table has single field of disk space, known as segment, set aside for it in the tablespace. Segments consist of contiguous sections

Modify a sequence: ALTER SEQUENCE SEQSS INCREMENT 2 MAXVALUE 3000;   Removing a sequence: DROP SEQUENCE SEQSS;

need a DBMS system on any data for assignment.

Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

#questiontypes of keys examples..

Describe Parameteric end users? Parametric end users might be given update access, but are commonly not permitted to change the structure of data.

A file of employee have 10,000 blocks on a cylinder of a disk with characteristics r=8ms and btt=0.6ms I want to know the cost of read inthe file under following conditions for a q


What is the major advantage of object-oriented programming paradigm? The ability to modify the explanation of an object without affecting the rest of the system is the main adv