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
You are managing the following database system: • DBMS: Oracle 11g • OS: Sun Solaris • System architecture: Web-based application using ASP.Net • Purpose of Server: HR managem


Question: (a) What are decision support systems, and what role do they play in the business environment? (b) Data mining is a knowledge discovery process of automated extr

how can apply joins on table

Saving Derived Attributes to Avoid Re-computation Data that is derived from other data should be stored in the computed form to avoid re-computation. For this, we could define

1) 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 pict

Increased overheads on update : On the drawbacks side, it will need the system to ensure that all replicas of a relation are consistent. This shows that all the replicas of the rel

How can you terminate the MySQL Server? Typing the following in Command prompt will shut down the server completely as root user % mysqladmin -u root -p shutdown

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)

Difference between Operating System and Database Security Security within the operating system can be executed at various levels ranging from passwords for access to system, t