Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Best database for web backend on Linux?

Re: Best database for web backend on Linux?

From: Andrew Gideon <werdnaandrew_at_tagsys.commoc.sysgat>
Date: 1998/10/23
Message-ID: <70qjta$srj@dixie.tagsys.com>#1/1

In article <70oiem$phd$1_at_news.bctel.net>, "Thor" <thor_at_echidna.net> writes:
>we're still talking at cross purposes here.
>if we're using "browse-mode" as the starting point ....
>
>The Optimistic Locking is:
>
>t1. Read
>t2. Re-Read with Lock
>t3. Update
>t4. Commit / Rollback
>

I'm sorry, but this is not optimistic concurrency (or "browse mode"). Optimistic concurrency is essentially lock-free. So there is no "re-read".

The process is:

	t1. Read
	t2. Update

The update may succeed or fail, depending upon whether the data has been changed between t1 and t2. This is determined (in Sybase) via a serial that is updated (automatically) each time a row is written.

[This can be done "by hand" as well, by adding to the UPDATE's WHERE  clause a statement like "rowBeingUpdated.serial = @whatTheSerialWasBefore"  and then checking the row count.]

>You lock once you know the user wants to modify that record, not just when
>they are viewing it.
>

This is not correct. What you describe is how to handle "very long operations" (ie. in a data browser) with locking. Optimistic concurrency exists as an alternative to your solution.

Received on Fri Oct 23 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US