Subject Re: [firebird-support] Nested Transactions
Author unordained
I asked for this feature recently on the architecture list. There was a tiny bit of description,
but several people said they saw no use for it. That seems to be pretty much where that ended.
Without examples of a -need-, seems Firebird is going to stick with savepoints.

The main difference between the two is the concurrency of child transactions. With sub-
transactions, you could initiate multiple sub-transactions and work on all of them simultaneously.
With save-points, you have to finish one branch before moving to the next.

Firebird has save-points, which allow you to drop markers along the way and rollback to any of
them, then move forward again. Giving examples of save-points is easy in text mode, but good
examples of how you might use sub-transactions are hard to describe, same as describing the
problems of concurrent transactions (particularly isolation) ... except with extra levels of
complexity.

I personally see a use for simplifying apps, by letting all screens actually perform database
operations immediately (and rely on db validation rather than app validation), without forcing the
user to do things in order ... but hey, that's just me.

So, no: Firebird only has save-points, not sub-transactions. (sequential vs. concurrent.)

-Philip

---------- Original Message -----------

> Dimitry,
>
> He wants to know if rolling back a parent transaction will roll back a
> committed child transaction.
>
> Regards,
>
> Robert
>
> ----- Original Message -----
>
> > On 7 Jul 2004 at 17:49, Actnow Accounting P/L wrote:
> >
> > >Can you actually do this in Firebird ?
> > >
> > >TRANSACTION PARENT BEGIN:
> > > TRANSACTION CHILD BEGIN:
> > > UPDATE 1...
> > > UPDATE 2...
> > > UPDATE 3...
> > > TRANSACTION CHILD COMMIT
> > >TRANSACTION PARENT ROLLBACK
> > >
> > >resulting in undoing the child commit?
> >
> > What difference between your example and the same action without
> > nested transaction? I.e. why you can't do just
> >
> > TRANSACTION BEGIN:
> > UPDATE 1...
> > UPDATE 2...
> > UPDATE 3...
> > TRANSACTION ROLLBACK
> >
> > SY, Dimitry Sibiryakov.
------- End of Original Message -------