Unit - 5-Database Security Transaction Processing
Unit - 5-Database Security Transaction Processing
Database Security: Database security refers to the collective measures used to protect
and secure a database or database management software from illegal use and malicious
threats and attacks. Database security covers and enforces security on all aspects and
components of databases like Data stored in database, Database server, DBMS.
Database security is the protection of the database against intentional and unintentional
threats that may be computer-based or non-computer-based. Database security is the
business of the entire organization as all people use the data held in the organization's
database and any loss or corruption to data would affect the day-to-day operation of the
organization and the performance of the people. Therefore, database security encompasses
hardware, software, infrastructure,people and data of the organization.
Q. Explain ACID properties of transaction. 4 Marks
(Four ACID properties - 1 mark each)
ACID Properties:
1. Atomicity: When one transaction takes place, many operations occur under one transaction.
Atomicity means either all operations will take place property and reflect in the database or
none of them will be reflected.
3. Isolation: It is necessary to maintain isolation for the transactions. This means one
transaction should not be aware of another transaction getting executed. Also their intermediate
result should be kept hidden.
4. Durability: When a transaction gets completed successfully, it is important that the changes
made by the transaction should be preserved in database in spite of system failures.
Ans:
Commit
The COMMIT command is used to save changes invoked by a transaction to the database.
The COMMIT command saves all transactions to the database since the last COMMIT or
ROLLBACK command.
The syntax for COMMIT command is as follows: SQL> COMMIT;
Rollback:
The ROLLBACK command is used to undo transactions that have not already been saved to
the database.
The ROLLBACK command can only be used to undo transactions since the last COMMIT or
ROLLBACK command was issued.
We can either rollback the entire transaction or till a particular save point transaction can be
rolled back.
The syntax for ROLLBACK is:
ROLLBACK TO SAVEPOINT_NAME; OR
ROLLBACK;
e.g. ROLLBACK TO sv1;
OR ROLLBACK
3. Isolation: It is necessary to maintain isolation for the transactions. This means one
transaction should not be aware of another transaction getting executed. Also their
intermediate result should be kept hidden.
database.
or ROLLBACK command.
SQL> COMMIT;
Savepoint:
is as follows:
SAVEPOINT SAVEPOINT_NAME;
e.g. SAVEPOINT SV1;
Rollback:
ROLLBACK TO SAVEPOINT_NAME;
e.g. ROLLBACK TO sv1;
Q. Draw transaction state diagram.
(Correct diagram- 2 Marks)