Processing transactions, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Processing transactions

Using raise_application_error - user-defined exceptions, Using raise_applic...

Using raise_application_error The Package DBMS_STANDARD that is supplied with Oracle gives language facilities that help your application to interact with Oracle. For illustra

Opening a cursor, Opening a Cursor Opening the cursor executes the que...

Opening a Cursor Opening the cursor executes the query & identifies the result set that consists of all rows that meet the query search criteria. For the cursors declared usin

Overview of control structures-comparison operators, Overview of control st...

Overview of control structures According to the structure theorem, any computer program can be written by using the basic control structures as shown in figure below. They can b

Recursive subprograms, Recursive Subprograms The recursive subprogram ...

Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

An active database in pl-sql, Consider the following set of database tables...

Consider the following set of database tables (same tables from Assignment 6-1). Please take note of foreign keys (most of them carry the same names as the corresponding primary ke

Initializing records, Initializing Records The illustration below show...

Initializing Records The illustration below shows that you can initialize a record in its type definition. Whenever you declare a record of the type TimeRec, its 3 fields supp

Exception handling, set serveroutput on declare a number(5); b n...

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d

Execute immediate statement - syntax, EXECUTE IMMEDIATE Statement   Th...

EXECUTE IMMEDIATE Statement   The EXECUTE IMMEDIATE statement prepare (parses) and instantly executes a dynamic SQL statement or an anonymous PL/SQL block. Syntax:

Sequential control - pl/sql, Sequential Control Dissimilar to the IF and ...

Sequential Control Dissimilar to the IF and LOOP statements, the GOTO and NULL statements are not important to the PL/SQL programming. The configuration of PL/SQL is such that th

Bulk fetching - bulk bind performance improvement, Bulk Fetching The i...

Bulk Fetching The illustration below shows that you can bulk-fetch from a cursor into one or more collections: DECLARE TYPE NameTab IS TABLE OF emp.ename%TYPE; TYPE S

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd