Re: Record Locking ???

From: Louis Frolio <froliol_at_yahoo.com>
Date: 8 May 2003 13:11:07 -0700
Message-ID: <94c28610.0305081211.75b0bf74_at_posting.google.com>


You should not let this developer do any record locking. The Oracle RDBMS will handle all record locking much more efficiently than any user could. What is the motivation for the user wanting to lock a record? Until he/she issues a commit or rollback the data(prior to the new data issued by this user) in that record will still be able to be viewed by another user. Dirty reads are not possible in Oracle.

Louis.

Walt <walt_at_boatnerd.com.invalid> wrote in message news:<3EB97CEF.EB7E177A_at_boatnerd.com.invalid>...
> TurkBear wrote:
> > Michael Hill <hillmw_at_ram.lmtas.lmco.com> wrote:
> >
> > >I have a Coldfusion web application that makes calls to Oracle tables,
> > >inserts, updates, et. al and one of my users wants to add "Record
> > >Locking". I am thinking this is not practical and is only valid in a
> > >client-server environment.
> > >
> > >Am I wrong?
> > >
> > >Comments?
> > Ask your user why he wants to manually do what Oracle will handle automatically?
> >
> > Just curious...
>
> While Oracle handles row locking automagically within a transaction, the
> issue as I see it is how to preserve a transaction across multiple web
> requests. i.e. the interaction is something like
>
> 1. begin a transaction
> 2. get the data with a select for update
> 3. update the data
> 4. commit or rollback the transaction
>
> The issue is item 2 and item 3 are handled in separate web requests -
> when the user comes back to update the data, how does he pick up the
> transaction that he opened in item 1?
>
> There's no reason that I see that would make this technically
> impossible, but I have no idea how to do it in Cold Fusion.
Received on Thu May 08 2003 - 22:11:07 CEST

Original text of this message