Processing transactions, PL-SQL Programming

Processing Transactions

This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involving how to control whether changes to the Oracle data are made permanent or undo.

The jobs or tasks that Oracle manages are termed as the sessions. The user session is started whenever you run an application program or an Oracle tool and connect to the Oracle. To permit the user sessions to work "concurrently" and share the computer resources, the Oracle should control the concurrency, the accessing of similar data by various users. Without sufficient concurrency controls, there might be a loss of the data integrity. That is, the changes to data might be prepared in the wrong order.

Oracle uses the locks to control the concurrent access to data. The lock gives you the temporary ownership of a database resource like a table or a row of data. And hence, the data cannot be changed by other users unless you finish with it. You never require explicitly lock a resource as default locking mechanisms protect the Oracle data and structures. Though, you can request data locks on the tables or rows when it is to your benefit to override the default locking. You can prefer from various modes of locking like the exclusive and row share.

The deadlock can occur when two or many users try to access the similar schema object. For illustration, the two users updating the similar table might wait if each tries to update a row presently locked by the other. As each user is waiting for the resources held by the other user, neither can continue till the Oracle breaks the deadlock by signaling an error to the last participating transaction.

If a table is being queried by one user and updated by the other at similar time, the Oracle generates a read-consistent view of the data for the query. That is, the data read by the query does not change, once a query begins and as it proceeds. The Oracle take snapshot of the table's data and records changes in the rollback segment. The Oracle uses rollback segments to build read-consistent query results and to undo the changes when necessary.

Posted Date: 10/4/2012 4:50:28 AM | Location : United States







Related Discussions:- Processing transactions, Assignment Help, Ask Question on Processing transactions, Get Answer, Expert's Help, Processing transactions Discussions

Write discussion on Processing transactions
Your posts are moderated
Related Questions
Short-Circuit Evaluation When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops computing the expression as soon as the result

BETWEEN Operator The operator BETWEEN, tests whether the value lies in a specified series. That means "greater than or equivalent to low value and less than or equivalent to hig

Use of COUNT in SQL It describes and discusses various general methods of expressing constraints, eventually noting that support for "=" with relation operands is sufficient f

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Need Windows and Linux system Administrator We are seeking a part time system administrator to take care of our servers. Your things to do would add, but not limited to: -

OPEN-FOR Statement The OPEN-FOR statements execute the multi-row query related with a cursor variable. It also allocates the resources used by the Oracle to process the query a

Using Operator VALUE: As you may expect, the operator VALUE returns the value of an object. The VALUE takes its argument a correlation variable.  For illustration, to return a

Declaring Exceptions The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an excep