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?

Transactions t1 and t2 are in a deadlock, Evaluate: a.When transactions...

Evaluate: a.When transactions T1 and T2 are in a deadlock, one of the transactions will eventually implement to completion and let the other one continue implementation. b.

Write a short note on built in function in qbe, Write a short note on built...

Write a short note on built in function in QBE? Built in function in QBE: QBE involves various built in functions like AVG, MAX,MIN,SUM and CNT. We must prefix these operator

Create table and insert data manufacturer-dbms, Create a table according to...

Create a table according to given data:  AmbulanceDriver(Driver_Number#, Name, Address, Birth_Date) AmbulanceDriverTeam(Team_Number#, Driver_Number#, Join_Date, Lea

BOGUS VS GENUINE EMPOWERMENT, what is bogus empowerment. And what is genuin...

what is bogus empowerment. And what is genuine empowerment

Creating a view-data control, Creating a view: A query can be embed...

Creating a view: A query can be embedded within the CREATE VIEW STATEMENT A query can have complex select statements containing join, groups and sub- queries A quer

Optimistic concurrency control, Optimistic Concurrency Control Is locki...

Optimistic Concurrency Control Is locking the only way to stop concurrency related problems? There exist some other ways too. One such way is known as an Optimistic Concurrency

Identification of concurrency, Identification of concurrency Identifica...

Identification of concurrency Identification of concurrency: Dynamic model identifies concurrency. Two objects are said to be parallel (concurrent) if they can receive events a

Illustrate the definition of the classes and operation, The definition of t...

The definition of the classes and operation can often be adjusted to increase the amount of inheritance". Justify the above statement.   Adjustment of Inheritance The def

State about the tables- DBMS, State about the Tables- DBMS Data is sto...

State about the Tables- DBMS Data is stored in columns and rows (much like a spreadsheet -main difference is how data is organised). Every row in a table is known as a record

Limitations of file based system, Limitations of File Based System The...

Limitations of File Based System The file-based system has some limitations. The limitations are listed as follows: Isolation and separation of data: When the data is

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