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
The First Normal Form (1NF) Let us first describe 1NF: Definition: A relation (table) is in 1NF if 1.      There are no duplicate tuples or rows in the relation. 2.

What is Candidate Key Super Key or Candidate Key: It is such an attribute of a table that can uniquely recognize a row in a table. Generally they have unique values and can n

Our company hires independent contractors to install equipment at precise locations across North America. We want to track the installation data and generate reports. The compan

Explain the Management of Data Store Every system irrespective of its nature of application requires storing permanent data for consequent use in problem solving. Some objects

Explain the disadvantages of file oriented approach? In the oriented approach Applications are designed in isolation. Design of application is optimized for one application. In

Question (a) Concurrent access to data from a database is a normal part of application program usage. Describe three approaches to concurrency control (b) Distinguish among

Project Description: I am having a random problem with my Wordpress site. If I click on "Publish" and "Add new", it takes me to a 404 page not found of /wp-admin/post.php (th

Consider the subsequent relations for a database which keeps track of business trips of salespersons in a sales office: SALESPERSON (SSN, Name, start_year, Dept_no) TRIP (SSN, Fr

Dirty Reads: T10 reads a value which is updated by T9. This update has not been committed and T9 aborts. T9 T10 Value of x old value = 200

Q.   Explain  data aggregatio n and discuss different design constraints. Sol. Aggregation   One limitation of the E-R model is that it cannot express relationships amon