How transactions guard your database, PL-SQL Programming

How Transactions Guard Your Database

The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL statements as a unit so that all the changes brought about by the statements are either committed (made permanent) or rolled back (undone) at similar time. If your program fails in the center of a transaction, then the database is automatically restored to its previous state.

The first SQL statements in your program begin a transaction. Whenever a transaction ends, the next SQL statement automatically begins the other transaction. And hence, every SQL statement is part of the transaction. The distributed transaction involves at least one SQL statement which updates the data at multiple nodes in a distributed database.

The COMMIT and ROLLBACK statements assures that all the database changes brought about by the SQL operations are either made permanent or undone at similar time. All the SQL statements executed as the last commit or rollback make up the present transaction. The SAVEPOINT statement names and marks the present point in the processing of a transaction.

Posted Date: 10/4/2012 4:51:02 AM | Location : United States







Related Discussions:- How transactions guard your database, Assignment Help, Ask Question on How transactions guard your database, Get Answer, Expert's Help, How transactions guard your database Discussions

Write discussion on How transactions guard your database
Your posts are moderated
Related Questions
Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

Wrapping and unwrapping in SQL Operators WRAP and UNWRAP in connection with attributes whose declared types are tuple types. Example shows how extension and projection can be

Controlling Autonomous Transactions The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the oth

WHILE-LOOP The WHILE-LOOP statement relates a condition with the series of statements enclosed by the keywords LOOP and END LOOP, as shown: WHILE condition LOOP sequence_of_sta

3CX PBX sync Windows Service Project Description: !! You require access to a commercial version of the 3CX PBX system in order to be able to program the API !! !! You requ

Question: Consider the following relations (primary keys are underlined): AUTHOR (ANo, aname, address, speciality) PUBLISHER (PNo, pname, Location) BOOK (BNo, Title, ISBN,

Definition of CROSS JOIN - SQL Let s = t1 CROSS JOIN t2, where t1 and t2 are table expressions optionally accompanied by range variables. Then: Note: Here T denotes Table

Using FOR UPDATE If you declare a cursor which will be referenced in the CURRENT OF clause of an UPDATE or DELETE statement, you should use the FOR UPDATE clause to obtain an

Using Operator REF: You can retrieve refs by using the operator REF that, like VALUE, takes as its argument a correlation variable. In the illustration below, you retrieve one

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,