Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials .NET Java Soft skills CV GD Work from home IT practice test MBA practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
Java interview questions
Java frequently asked questions
Test your Java skills!
Test your JDBC skills!
Test your EJB skills!
 
Java objects, classes & methods
Java operator  Java variables
Java overloading and overriding
Java abstract classes
Java data types  Java arrays
Java exception  Java events
Java virtual machine
Java input and output
Java URL connections
Java sockets  JNDI
Java applets  Java AWT
Java drawing AWT components
Core java  JDBC  JSP  EJB
J2EE  JNI  Servlets  Struts
Java threading  J2ME  JMS
Java web services  RMI
Internationalization  JavaScript
EJB Architecture  Spring
Java Transaction API – JTA  JBOSS
Java transaction services, JTS
Java GUI Framework interview
SWT/JFace interview
MVC and Jface  JavaServer Faces
Hibernate interview  JAAS
JavaMail interview  Tomcat
MIDP interview
Weblogic interview
Ant interview
Websphere interview
Ruby interview
jQuery interview
Aspect Oriented Programming, AOP
Java design patterns
Java localization
More links
JavaServer Faces 
OpenCms Application Overview 
EJB 3 Entities 
Oracle Web RowSet 
 

JDBC Optimistic and Pessimistic locking

NEXT>>
Optimistic and pessimistic locking in JDBC - posted by Nishant

Explain optimistic and pessimistic locking in JDBC.

Answer
There are two kinds of locking available in JDBC.

Optimistic Locking
Pessimistic Locking

Pessimistic Locking locks the records as soon as it selects the row to update.

Optimistic Locking locks the record only when updating takes place.


Optimistic and pessimistic locking in JDBC - posted by Vidya Sagar

Explain the optimistic and pessimistic locking in JDBC.

Optimistic Locking:

Optimistic locking ensure the locks are held between selecting, updating, or deleting rows. This process needs a way to ensure that the changes to data are not performed between the time of being read and being altered. The primary advantage of optimistic locking is , it minimizes the time for which a given resource is unavailable which is used by another transaction and in this way it more scalable locking alternative.

Pessimistic Locking:

The pessimistic locking strategy assumes the probability of modifying a row that is used by one user can be used by another user for modifying. In this scenario, a lock is held between the row selection time and the updation time for changing operations on that row. The pessimistic locking strategy guarantees the changes are made safely and consistently.

NEXT>>

More JDBC Links

What are different types of resultset in JDBC?

Answer - Resultset contains results of the SQL query.....

What are different transaction levels in JDBC?

Answer - Transaction Isolation levels is used to implement locking.....

What is phantom read?

Answer - If you execute a query at time T1 and re-execute it at time T2, additional rows may have.....

Advantages of JDBC.

Answer - Businesses can continue to use their installed databases and access.....

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.