FIT2094 Lecture Notes - Lecture 8: Transaction Processing, Database Transaction, Granularity

116 views2 pages
W8: SQL!
UPDATE !
Change the values of existing data !
For example, at the end of semester, change the mark and grade from 0,’NA’ to the actual mark !
and grade. !
DELETE !
Removing data from the database DELETE FROM table !
[WHERE condition]; !
DELETE FROM enrolment#
WHERE sno=‘112233’#
AND unit_code= (SELECT unit_code FROM unit WHERE unit_name=‘Databases’ ) AND
semester=‘1’#
AND year=‘2012’; !
Transaction Properties !
A transaction is the execution of a program that accesses (read) or changes (write) the contents of
a database system. !
A transaction must have the following properties: – Atomicity !
All database operations (SQL requests) of a transaction must be entirely completed or entirely
aborted !
– Consistency#
It must take the database from one consistent state to another !
– Isolation !
It must not interfere with other concurrent transactions !
Data used during execution of a transaction cannot be used by a second transaction until
the first one is completed #
– Durability #
Once completed the changes the transaction made to the data are durable, even in the event of
system failure !
Transaction Management !
$Transaction management: The management of multiple transactions submitted
concurrently by various users to the same database system. !
$Follows the ACID properties. !
$Transaction boundaries #
– Start !
$first SQL statement is executed (eg. Oracle) #
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Update: change the values of existing data, for example, at the end of semester, change the mark and grade from 0,"na" to the actual mark and grade. Delete: removing data from the database delete from table. And unit_code= (select unit_code from unit where unit_name= databases" ) and semester= 1". A transaction is the execution of a program that accesses (read) or changes (write) the contents of a database system. A transaction must have the following properties: atomicity: all database operations (sql requests) of a transaction must be entirely completed or entirely aborted. Consistency: it must take the database from one consistent state to another. It must not interfere with other concurrent transactions. Data used during execution of a transaction cannot be used by a second transaction until the rst one is completed. Durability: once completed the changes the transaction made to the data are durable, even in the event of system failure.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents