Re: Informix vs. Sybase vs. Oracle vs. (gasp) MS SQL Server
Posted in 1997
Anthony Mandic wrote:
[Snip]
> Here is the crux of your problem. "We need to lock".
> Its this mindset that doesn't allow you to see a better
> solution, so you let your DB server do it for you.
>
> > SELECT * FROM master WHERE id = ? FOR UPDATE;> >
> > -- No need to lock the detail recs 'cause the master rec is locked.
>
> Yes, no need to lock. Its how you lock master thats the
> problem. I'll explain below.
And:
> You can use a non-server generated lock instead. Then it
> just becomes a matter of updating the master table. The
> action of this update is also the action of releasing the
> lock. No other process is locked out of reading the record
> but others can't update or delete while that record is marked
> as being in use (provided that they observe the rules).
I have never heard before of "non-server generated locks". Could you
explain to me what they are and how they work?
-Snorri
--
Snorri Bergmann | Mail: snorri@strengur.is
Strengur Consulting Engineers | WWW: http://www.strengur.is/
Armuli 7 | Phone: +354 550 9000 (9007 direct)
108 Reykjavik Iceland | Telefax: +354 550 9010