Subject | Re: Transaction Question |
---|---|
Author | George |
Post date | 2006-10-17T16:28:19Z |
--- In firebird-support@yahoogroups.com, Todd Brasseur <todd@...>
wrote:
One technique I have used before is to have a control table.
The control table has only 1 record per user consisting of
appropriate flags and an Owner field set to CURRENT_USER.
Have a trigger that fires only when all the flags in the current user
set are set to a given condition.
Your other tables can set/unset the various flags.
Without knowing more I can't offer anything else and this approach
may not suit - just my thoughts. (It also pre-supposes unique user
names throughout).
Cheers
George
wrote:
>main
> Martijn Tonies wrote:
>
> > Todd,
> >
> > > Our application is used for Property Assessment. We have one
> > > table (the properties) and many child tables and grand childtables,
> > > etc. When the user uses the application they may add, change orthey
> > > delete many records in the child and grand child tables. When
> > > are done doing their changes, I want to run a stored procedureto
> > > recalculate the properties assessment.this
> > >
> > > Is it possible to do this using triggers? If not, how can I do
> > > in the database and not through the application?don't
> > >
> > > I know how to do it using triggers, but the problem is that I
> > > want to recalculate everytime a child or grandchild record isaltered.
> > > I only want to do it at the end of the changes.finished
> >
> > >From within the database, there's no way to "know" that a user
> > changing "lots of records".magical
> >
> > You should do this from the client side.
> >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> That was my thinking as well. But I wondered if there was some
> way to do this in the database so we would be protected eitherway. We
> try to encourage clients not to update themselves directly (notthrough
> the application) but we can't totally control them.Hi
>
> Todd
>
>
>
>
>
>
>
>
>
>
>
> >
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>
One technique I have used before is to have a control table.
The control table has only 1 record per user consisting of
appropriate flags and an Owner field set to CURRENT_USER.
Have a trigger that fires only when all the flags in the current user
set are set to a given condition.
Your other tables can set/unset the various flags.
Without knowing more I can't offer anything else and this approach
may not suit - just my thoughts. (It also pre-supposes unique user
names throughout).
Cheers
George