Re: Ghost update in concurrent transaction

From: D Guntermann <guntermann_at_hotmail.com>
Date: Tue, 31 Aug 2004 00:03:05 GMT
Message-ID: <I3AAt4.G8L_at_news.boeing.com>


"Sudin" <sudinkc_at_yahoo.com> wrote in message news:1dcfba52.0408292339.77cc6d07_at_posting.google.com...
> "Dan" <guntermann_at_verizon.com> wrote in message
news:<tywYc.2364$bD5.1570_at_trnddc03>...
> > "Sudin" <sudinkc_at_yahoo.com> wrote in message
> > news:1dcfba52.0408291014.303025b_at_posting.google.com...
> > > Hello can anyone explain what ghost update does in a concurrent
> > > transaction? What I haven't understood is suppose an integrity
> > > constraint exists which says x+y+z = 1000 and concurrent transaction
> > > table below:
> > > ========
>
> [snip]
>
> >
[snip]

 If
> > you work through these two scenarios, you will see that in either case,
the
> > integrity constraint is not violated by either transaction at commit
time.
> > In other words, the variable s would have a value of 1000 for T1 in
either
> > case, and x+y+z would still evaluate to 1000 for T2 in either case.
> >
[snip]

> Word to word from the book it says "Transaction t1 observes only some
> of the effects of the transaction t2, and thus observes a state that
> does not satisfy the integrity constraints. This is called a ghost
> update.
>

Just out of curiosity, what textbook are you referring to? The phrasing of the problem doesn't seem very rigorous or formal.

> So, t1 violates integrity constraint because it read a value of z that
> had value
> z+100 which would in turn mean s = x + y + (z+100) instead of s = x +
> y + z??

Yes.

Isn't it because of this that the value of s is 1100 (
> mentioned in the text ) instead of 1000 and hence ghost update?

Yes. You got it.
[snip]

> >
> > > cheers
> > > Sudin.
> >
> > HTH,
> >
> > Dan G.
>
> thanx for the promptness.
> cheers
> Sudin.

Dan G. Received on Tue Aug 31 2004 - 02:03:05 CEST

Original text of this message