Home » SQL & PL/SQL » SQL & PL/SQL » Lock row
Lock row [message #196821] Sat, 07 October 2006 23:29 Go to next message
Messages: 38
Registered: July 2006
Location: Viet Nam
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
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: how to retrieve attributes in the starts with of the connect by
Next Topic: sql query
Goto Forum:

Current Time: Sun Aug 20 03:06:14 CDT 2017

Total time taken to generate the page: 0.04573 seconds