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 ļ¬rst 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 !
ā€¢$ļ¬rst 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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents