What is a transaction? , Database Management System

Assignment Help:

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:


Related Discussions:- What is a transaction?

What functions does a data dictionary perform, What functions does a data d...

What functions does a data dictionary perform? In a (DBMS)data management system, the principal functions performed by the data dictionary are Management of data defini

Implementation of association as an object, Implementation of association a...

Implementation of association as an object Implement as a separate association object, independent of either class, as in Figure. An association object is a group of pairs

What is meant by functional dependencies, What is meant by functional depen...

What is meant by functional dependencies? Consider a relation schema R and α C R and β C R. The functional dependency α ->β  holds on relational schema R if in any legal relati

Transaction, .#question. Discuss the problem which may arise during concurr...

.#question. Discuss the problem which may arise during concurrency control and recovery in distributed database which are not encountered in controlized database environment.

Create a subroutine, 1. Create a subroutine that does the remote blast on t...

1. Create a subroutine that does the remote blast on the file protein.fa. 2. Pass that returned files from the blast to another subroutine that parses the output and sends it to

Determine the strong and weak entity, Determine the Strong and Weak Entity ...

Determine the Strong and Weak Entity Based on the method of foreign key, there might be arise a situation when we have to relate an entity having a primary key of its own and a

What is candidate key, What is candidate key? Candidate Key - A candi...

What is candidate key? Candidate Key - A candidate key of an entity set is a minimal superkey, which uniquely identifies each row in the relation.

Explain superkey, Explain Superkey Ans: A superkey is described in the ...

Explain Superkey Ans: A superkey is described in the relational model of database organization like a set of attributes of a relation variable for which it holds that in all re

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd