Wednesday, April 8, 2009

Part Time Jobs

Earn Rs.2000 daily. No Investment.

Wanted Online Internet job workers. Job is only through Internet. Work part time. You can earn Rs.750-2000/- daily. These are genuine Internet jobs. No Investment required. Only serious enquires please. For more details visit http://www.earnparttimejobs.com/index.php?id=1243270

Indians Earn Rs.250000 monthly. Easy form filling jobs

Earn Rs.35,000-50,000/- per month from home No marketing / No MLM .
We are offering a rare Job opportunity where you can earn from home using your computer and the Internet part-time or full-time. Qualifications required are Typing on the Computer only. You can even work from a Cyber Caf or your office PC, if so required. Working part time for 1-2 hours daily can easily fetch you Rs. 20-25,000 per month. Online jobs, Part time jobs. Work at home jobs. Dedicated workers make much more as the earning potential is unlimited. No previous experience is required, full training provided. Anyone can apply. Please Visit
http://www.earnparttimejobs.com/index.php?id=1243270

Wanted Indian Internet workers. Earn Rs.2000 daily from internet.

Dear Friends, Are you interested to make Rs.20,000 to Rs.1,20,000 A Day ? This is not a get rich quick scheme. This is a legal opportunity to make good money when you do it part time. This opportunity is a proven way to make Rs.20,000 to Rs.1,20,000 A Day . There are already 3,00,000 people around the world grabbed this opportunity and making tons of money every month. If you are interested to know more about this opportunity, visit http://www.earnparttimejobs.com/index.php?id=1243270

Part time Internet Jobs for Indians

Are you looking to work from Home? Home based typing positions are now being offered by many Companies at present! Receive your paychecks every month! Full training provided by the company itself. No Selling Required. Please visit the website http://www.earnparttimejobs.com/index.php ?id=1243270

How to Earn Rs.25000 every month in internet without Investment?

You can earn Rs.25000 very first month from internet. This is easy form filling jobs. Work less than 1 hr daily. No investment. Please visit the website http://www.earnparttimejobs.com/index.php?id=1243270

Tuesday, April 7, 2009

Transaction Isolation Level

Read phenomenas:
The ANSI/ISO standard SQL speaks of three different phenomenas when a session reads data that another session might have changed:
  1. Dirty read,
  2. Non-repeatable read and
  3. Phantom read
Dirty read:
If User1 can read data that User2 has written but not yet commited, this is called a dirty read. It is dirty because user2 might later decide to rollback the transaction which leads to the situation that User1 works with data that actually must be considered as non-existant.
Oracle doesn't allow dirty reads.

For eg.User1 Transaction.
UPDATE employee SET salary = 10000 WHERE empno = 'I-001'
User2 Transaction.
SELECT * FROM employee

(User2 Transaction sees data updated by User1 transaction. Those updates have not yet been committed.)

Non-repeatable read:
User1 reads data which is later changed and commited by User2. If User1 reads the same data again (after User2's commit) and finds it to have changed or to be deleted (according to User2's changes), this is called a non-repeatable read. It is called non-repeatable because the same select statement doesn't return the same data (within the same transaction).

For eg.User1 Transaction.
SELECT * FROM employee WHERE empno = 'I-001'
User2 Transaction.
UPDATE employee SET salary = 20000 WHERE empno = 'I-001'

(user2 updates rows viewed by User1 before user1 commits.) If user1 issues the same SELECT statement, the results will be different.

Phantom read:
User1 reads data (select) with a specific where condition. After this read, User2 inserts some data that meets the User1's where condition and commits the inserted data. When User1 issues a select statement with the same where condition, it finds new records. It is called phantom read because the new records seem to be of phantom origin.
A phantom read is thus a special case of a non-repeatable read.

For eg.User1 Transaction.
SELECT * FROM employee WHERE salary > 30000
User2 Transaction.
INSERT INTO employee(empno, firstnme, lastname, job,salary)
VALUES ('I-001', 'Sivaji','Chinnanan','Software Engineer',35000)

User2 inserts a row that would satisfy the query in User1 if it were issued again.

Depending on the scenario the above read phenomenas are used.
There are four isolation levels:
  1. READ UNCOMMITTED
  2. READ COMMITTED
  3. REPEATABLE READ
  4. SERIALIZABLE

READ UNCOMMITTED:
The READ UNCOMMITTED isolation level allows dirty reads.
When it's used, you can read an uncommitted transaction that might get rolled back later. This isolation level is also called dirty read. This is the lowest isolation level.

READ COMMITTED:
Each query executed by a transaction sees only data that was committed before the query began (Oracle default isolation level)

REPEATABLE READ:
When it's used, then dirty reads and nonrepeatable reads cannot occur. It means that locks will be placed on all data that is used in a query, and another transactions cannot update the data.

SERIALIZABLE:
Most restrictive isolation level. When it's used, then phantom values cannot occur. It prevents other users from updating or inserting rows into the data set until the transaction is complete.

Summary:

Isolation Levels

Dirty read

Non repeatable read

Phantom read

Read Uncommitted

Yes

Yes

Yes

Read Committed

No

Yes

Yes

Repeatable Read

No

No

Yes

Serializable

No

No

No




Follow the following instruction to set isolation levels in JDBC
con.setTransactionIsolation (Connection.TRANSACTION_READ_UNCOMMITTED);
con.setTransactionIsolation (Connection.TRANSACTION_READ_COMMITTED);
con.setTransactionIsolation (Connection.TRANSACTION_READ_REPEATABLE_READ);
con.setTransactionIsolation (Connection.TRANSACTION_READ_SERIALIZABLE);
con.setAutoCommit(false);