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
Company Database: a-)Here is the ER Model b-)Here is the Relational Model:     IMPORTANT NOTICE FOR SOLUTION TYPE: ***THIS ASSIGNMENT WILL BE SOLVED BY THE

Explain the Weak Entity Set An Entity set which does not have sufficient attribute to make a primay key is known as weak entity set. For instance, dependents of an employee in

Probelm: (a) A distributed database (DDB) is a collection of multiple, logically interrelated databases which are physically distributed over a computer network" (i) Give a

Question 1 Draw a Data Flow Diagram for a University scenario Question 2 Discuss the following with suitable examples Relational Algebra Operators Database Pla

How external/conceptual mapping and conceptual /internal mapping is performed

Home based assignment Consider an ORDER table with the following attributes: • Order Number (ONo),Customer Number (CNo),Customer Name (CNa),Item Number (INo),Unit Price (UP), Quant

Explain outer join? Outer Join - If there are any values in one table which do not have corresponding value(s) in the other, in an equi-join which will not be chosen. Such ro

a project based on normalization with first, second and third normalization. There need to be a diagram also

Control as State within Program 1.  The term control exactly means to check effect of input within a program. For illustration, in Figure, after the ATM card is inserted (a

Describe the GRANT function and explain, how it associates to security. What kind of privileges may be granted? How are they revoked? Ans: Since more than one user can aacce