Example of transaction? , Database Management System

Example:; transfers transfer_amount from x's account to y's account

; Supposes x&y both accounts exist

TRANSACTION (x, y, transfer_amount)

Start transaction

IF X AND Y exist then

READ x.balance

IF x.balance > transfer_amount THEN

x.balance = x.balance - transfer_amount

READ y.balance

y.balance = y.balance + transfer_amount




Please note the use of 2 keywords here COMMIT and ROLLBACK. Commit makes sure that all the modifications made by transactions are made permanent. ROLLBACK ends the transactions and discards any change made by the transaction. Transactions have definite desirable properties. Let us see into those properties of a transaction.

Posted Date: 3/11/2013 5:19:23 AM | Location : United States

Related Discussions:- Example of transaction? , Assignment Help, Ask Question on Example of transaction? , Get Answer, Expert's Help, Example of transaction? Discussions

Write discussion on Example of transaction?
Your posts are moderated
Related Questions
Why Like predicate used for? LIKE predicate: The LIKE predicate searches for strings in which have a certain pattern.

OBJECTIVES After going through this unit you should be capable to: Explain the File Based system and its limitations; Explain the structure of DBMS; Explain the

What is OOM? Object oriented modeling is an approach by which modeling of systems is done by visualizing the system based on real world concepts. Object oriented modeling does

Question: This form represents one of a number used for each sailing of a range of boats. A passenger may go on many sailings and will have the same passenger number for each.

Draw an ER diagram that represents the information described below. Show all entity sets, relationship sets, primary keys, and the mapping cardinality of the relationship sets.

I am doing research in this area, especially in sime join and join efficacy when several relations have been queried. Relations located in different sites. I need something like n

A distributed database is defined as "a collection of multiple logically interrelated database which are physically distributed over a computer network" (a) Give any three advan

Define Direct file organization? The direct file organization is employed to enhance the performance in accessing the records than sequential file organization. In direct file

Consider the subsequent relation schemes:  Project (Project#, Project_name, chief_architect)  Employee (Emp#, Empname)  Assigned_To (Project#, Emp#)  Give expression i