Subject RE: [firebird-support] Maintaining proper generator values
Author Wilson, Fred
Not tryin to get into a "yah, yah", but to me the following:
"Problems can be created from a generator being set to the wrong value."

"Problems can also be created from users adding records to the database
using rogue field values."

"Problems can be created from incorrectly coded applications."

etc.,

Are problems that should be fixed, and, if it were us, they would be fixed,
rather than trying to band aid up everything.

BTW, moving the PK out of the application, and into the server, via triggers
and/or stored procedures, really, really helps with the 3rd one listed above
(incorrectly coded applications).
That's what we do.

Guess it's just a matter of different ideas to problems. We like to fix 'em
not band aid them up ;)
We've tried band aids in the past and it seems to just create more problems.
If we find a bug, we fix it ;)

Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>






-----Original Message-----
From: Doug Chamberlin [mailto:yahoogroups@...]
Sent: Tuesday, November 11, 2003 1:52 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Maintaining proper generator values


At 11/11/2003 03:28 PM (Tuesday), Wilson, Fred wrote:
>The real question is *how* the generator(s) could have gotten set wrongly
??
>We never see it.
>No client application ever sets a generator.

My strategy goes at the issue from a different approach altogether. It is
not that the generator is set wrong but that the database is in an unusable
state.

Problems can be created from a generator being set to the wrong value.
Problems can also be created from users adding records to the database
using rogue field values. Problems can be created from corrupted database
files. Problems can be created from incorrectly coded applications.

Regardless of where the problems come from, I want to have a process in
place which enables the application to function without errors. For me that
means having the application check for a potential problem and fix it
before continuing.

The only way I know of that this can be done in a reasonable way is to
compare the current generator value with the existing field values and
adjusting the generator. (Yes, you could adjust the problem field values
but that cascades into a bunch of nasty data integrity problems.)
This applies whether you use one generator or more than one. It applies if
you use one generator for more than one purpose or not. It applies if you
use generated values for PKs or for non-PK values.

Does this solve all generator related issues? No. Is it intended to? No.





Yahoo! Groups Sponsor

ADVERTISEMENT

<http://rd.yahoo.com/SIG=12cqjir0l/M=258297.4155332.5363524.4049140/D=egroup
web/S=1705115386:HM/EXP=1068670373/A=1683962/R=0/*http://www.techsmith.com/r
dr/ban/syah/default.asp> click here

<http://us.adserver.yahoo.com/l?M=258297.4155332.5363524.4049140/D=egroupmai
l/S=:HM/A=1683962/rand=355232254>

To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]