Subject | Re: [firebird-support] Rdb$db_key inside triggers |
---|---|
Author | Ann W. Harrison |
Post date | 2005-05-23T19:14:24Z |
Nigel Weeks wrote:
seem to do what you need - is that all versions of a record share a
single db_key value.
What I think I might look at, in your situation, is using generator
values to tag record versions. Timestamps are too coarse a measure -
currently whole seconds, soon to be clunks (100 microsecond chunks,
IIRC). In Firebird you're unlikely to hit a duplicate clunk, but when
Vulcan introduces real parallelism, timestamps won't be unique, however
fine the measurement. Generators, on the other hand, are pretty
reliable, and (she says, madly counting on her fingers) you're about as
likely to run out of a 64 bit generator as time in the universe, at
least time as measured by early 21st century computers.
Regards,
Ann
>OK.
> Triggers fire on all events(Ins,Upd,Del), and record the changes into a
> central 'delta' table.
> The delta table is inspected on a regular basis, and Delta's are thenA problem with using the db_key - aside from the fact that it doesn't
>
seem to do what you need - is that all versions of a record share a
single db_key value.
What I think I might look at, in your situation, is using generator
values to tag record versions. Timestamps are too coarse a measure -
currently whole seconds, soon to be clunks (100 microsecond chunks,
IIRC). In Firebird you're unlikely to hit a duplicate clunk, but when
Vulcan introduces real parallelism, timestamps won't be unique, however
fine the measurement. Generators, on the other hand, are pretty
reliable, and (she says, madly counting on her fingers) you're about as
likely to run out of a 64 bit generator as time in the universe, at
least time as measured by early 21st century computers.
Regards,
Ann