Transaction: operations are performed successfully than it

Transaction: Transaction is a
group of sql (DML) statements which are used to perform certain combination of
operations like write, update etc. into one unit to make the consistency of
data. They are used to perform multiple actions if and only if all the
operations can be performed else none of the action or operation should not be done
and the database should not affect i.e; the transaction is ROLLBACK. If all the
operations are performed successfully than it will be save to database by
issuing the COMMIT command. There is a Transaction log which are used to make
the database to original state in case of failure occurs. With transactions
supports ACID properties. The real scenarios where Transactions are used are
Bank data base for money transactions, railway reservation etc.  Transaction is an automatic work with respect
to recovery and consistency.

Transaction Processing:

Your time is important. Let us write you an essay from scratch
100% plagiarism free
Sources and citations are provided

Get essay help

Transaction processing gives a
scheme which is used to check the progress and controls the execution of
transaction programs. Transaction processing mainly used in mission-critical
applications which requires large amount of parallel users with minimum downtime.  Proper use of Transaction Processing results
the controlling the execution of several applications which are executing
parallel. Transaction processing ensures the ACID properties over different
databases this can be done by using two-phase COMMIT. Transaction processing
system is best used if an application requires online access and also if there
is a modification on different databases.


Local Transaction: When the
transaction is limited to only single database or resource is called Local
Transaction and all the operations will commit at the end of the transaction.

Distributed Transaction:

Unlike to local transaction which
are limited to single resource distributed transactions extend across multiple
databases or resources. It is also similar to local transaction where at the
end the transaction should be either committed or roll backed. If we have a
situation where network failure occurs then but unfortunately in place of
rollback all the transactions the data in one of the database or resource is
committing this can happen due to many reasons to minimize these type of risk
distributed transaction uses TWO –PHASE COMMIT process.

Implicit transaction contains
only one statement of either INSERT, UPDATE, DELETE etc. After connecting to
the database then if we perform or execute any DML statements then changes are
made and saved to database automatically. This happens since the connection is
in auto commit transaction mode. If you don’t want to save any changes until
unless you specifies the COMMIT or ROLLBACK then we can use Implicit
Transaction. Using Implicit Transaction the transactions remains in effect
until the user issues the COMMIT or ROLLBACK commands.

Explicit transaction contains multiple
statements with BEGIN indicates start the transaction and END indicates end the
transaction. Using explicit transaction user is controlling when the
transaction is going to start and when it should ends. These are also called
user-defined transactions