Professional Documents
Culture Documents
https://www.javatpoint.com/dbms-reduction-of-er-diagram-into-table
TRANSACTION CONTROL LANGUAGE (TCL)
➢Transaction:
➢"A transaction is a set of database operations that performs a
particular task."
➢A transaction can be considered as an action or a series of actions.
➢These actions are carried out by a single user or application program
to perform operations for accessing the contents of the database.
➢A transaction can either be embedded within an application program
or can be specified interactively via a high level query language such
as SQL
TRANSACTION
➢Consider an example of fund transfer from one account to another
account.
➢This task involves updating balance in two - source and destination –
accounts.
➢So, it requires two database operations: one, to debit an amount in source
account, and to credit that amount in destination account.
➢At low level, these credit and debit operations may involve a series of
read and write operations on both of these accounts.
➢These types of all operations form a single transaction.
TRANSACTION
A Single Transaction contains all below operations.
ACCOUNT A ACCOUNT B
BALANCE=800 BALANCE=200
READ (BALANCE)
BALANCE=BALANCE-100;
WRITE (BALANCE)
READ (BALANCE)
BALANCE=BALANCE+100;
WRITE (BALANCE)
BALANCE=700 BALANCE=300
TRANSACTION
➢A transaction can involve various database operations, such as
➢Retrieve (Read): to retrieve data stored in a database.
➢Insert (Write): to store new data in a database.
➢Delete (Write): to delete existing data from a database.
➢Update (Write): to modify existing data in a database.
➢Commit: to save the work done permanently.
➢Rollback: to undo the work done.
TRANSACTION
➢A database management system (DBMS) hides much of the complexity
related to transaction processing from the users.
➢User can also control the execution of transaction using functionalities
provided by DBMS software.
➢For example, an Oracle provides commands like COMMIT, ROLLBACK,
and SAVEPOINT to control the execution of a transaction.
THANK YOU…..
Appear for Quiz Assignment in Microsoft Teams.
Note: It is mandatory for all students to appear for quiz assignment, it will be
considered as present in lecture and marks will be count as progressive
assessment.
If you do not appear than it will be considered as Absent in class and marks
will be 0 (zero).