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

How transactions guard your database, How Transactions Guard Your Database ...

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

Commit statement in pl sql, COMMIT Statement The COMMIT statement expli...

COMMIT Statement The COMMIT statement explicitly makes everlasting changes to the database during the present transaction. The Changes made to the database are not considered e

Effects of null in table literal, Effects of NULL in Table Literal Whe...

Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

Updating a variable, Updating a Variable Assignment of an attribute va...

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

Number types in pl/sql, Number Types The Number types permit you to sto...

Number Types The Number types permit you to store the numeric data (real numbers, integers, and floating-point numbers), show quantities, and do computations. BINARY_INTEG

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

Operator precedence-pl/sql expressions , Operator Precedence The operati...

Operator Precedence The operations within an expression are completed in a particular order depending on their precedence (priority). The table shows the default order of the op

Declaring cursor variables, Declaring Cursor Variables Once a REF CURS...

Declaring Cursor Variables Once a REF CURSOR type is define by you, and then you can declare the cursor variables of that type in any PL/SQL block or subprogram. In the exampl

Assignment statement in pl sql, Assignment Statement: The assignment s...

Assignment Statement: The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by

Table represents an extension - sql, Table Represents an Extension - SQL ...

Table Represents an Extension - SQL It describes how each tuple in a relation represents a true instantiation of some predicate and each true instantiation is represented by 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