Example of transaction? , Database Management System

Assignment Help:

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

COMMIT

ELSE DISPLAY ("BALANCE IN X NOT OK") ROLLBACK

ELSE DISPLAY ("ACCOUNT X OR Y DOES NOT EXIST") End_transaction

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.


Related Discussions:- Example of transaction?

Security-drawbacks of data distribution, Security: In a centralised system...

Security: In a centralised system, access to the data can be simply controlled. Though, in a distributed DBMS not only does access to replicated data have to be controlled in many

Database management issues, You are required to write a report which evalua...

You are required to write a report which evaluates two of the following issues in relation to your case study database: a. Security issues b. Performance issues c. Backup

Appointment systems with sms and voice call feedback, Automated system for ...

Automated system for appointment with sms and call confirmation with service providers and user has to be initiate automatically. After selecting time and date to use service, s

Disadvantages or unsecure, In Database software have only pure security or ...

In Database software have only pure security or some dis secured by administrator?

Strong entity set and weak entity set, Strong entity set and weak entity se...

Strong entity set and weak entity set? Strong entity set and weak entity set: A strong entity set has a primary key. All tuples in the set are distinguishable through that key.

Write short notes on index structure of files, WRITE SHORT NOTES ON INDEX S...

WRITE SHORT NOTES ON INDEX STRUCTURE OF FILES? There are two basic parts of indices 1.   Ordered indices 2.   Hash indices Every technique must be evaluated on the bas

Describe integrity constraints, Describe integrity constraints? Integr...

Describe integrity constraints? Integrity Constraints - A database is just as excellent as the information stored in it, and a DBMS must therefore help avoid the entry of inc

Demonstrate the uml model, Demonstrate the UML model Using UML, it is p...

Demonstrate the UML model Using UML, it is possible to generate code in any of the programming language from UML model (called forward engineering) and rebuild a model from an

Transaction, Draw the precedence graph of the following schedule and determ...

Draw the precedence graph of the following schedule and determine whether the schedule is serializable. (Note that all instructions, except lock and unlock, are omitted. We assume

What do you mean through integrity constraints, What do you mean through in...

What do you mean through integrity constraints? Integrity Constraints -An integrity constraint is a condition specified on a database schema and restricts the data in which

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