Home » SQL & PL/SQL » SQL & PL/SQL » Lock row
Lock row [message #196821] Sat, 07 October 2006 23:29 Go to next message
nghiant
Messages: 38
Registered: July 2006
Location: Viet Nam
Member
I have a bullentin board is in use public for anyone can edit. In case, have two person is editing in a row, for this reason I must lock row in database.

Solution 1: I using lock row (select ... for update), when user edit a row, system must keep a connection.

Solution 2: I using optimistic concurrency:
When user start update, select data from database to compare content with content before edit.
If it is not change than can update
If it is change than throw error.

Please give me your idea about performance execute in solution 1 and solution 2.
Re: Lock row [message #196901 is a reply to message #196821] Mon, 09 October 2006 01:50 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well, if this is a public system, I'm guessing that it'll be web based, so option 1 won't really be viable.
Previous Topic: writting to a text file
Next Topic: How to get the names that have mistakes from 2 tables
Goto Forum:
  


Current Time: Mon Dec 05 14:53:41 CST 2016

Total time taken to generate the page: 0.08647 seconds