Subject RE: [firebird-support] Generator and Trigger confusion ?
Author Wilson, Fred
Yes, we don't care about "gaps" either, as the PK is always divorced from
any meaningful data.
We don't put any of that logic (PK), in the client.
It's either done via triggers or in the stored procedures that the clients
call to insert a row.
We feel that it's not the clients responsibilty to figure out data (PK's)
that has nothing to do with the "real" data that it's working with.
By moving the logic to stored procedures and/or triggers, we could change to
way the PK's are created, and not have to change (add code and recompile)
the client apps.


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




-----Original Message-----
From: Artur Anjos [mailto:artur@...]
Sent: Tuesday, November 11, 2003 10:58 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Generator and Trigger confusion ?


Fred,

>>We *never* allow an application (user) to supply the PK value.

I do it all the time. :-)

It's quite easy to define a PK value in the client, post the data, and
'refresh' the values from the server using the primary key to identify the
row. A trigger will guarantee that a PK get's the value if the client
doesn't provide it.

We don't care about any 'jumps' in values, we use just one generator to all
tables. I have lot's of this 'jumps', but since the generator works outside
the transaction, I just get a unique identifier of the row. I really don't
care about a generator value - it could be positive, negative, as long as it
really is unique. And it always is.

Artur



Yahoo! Groups Sponsor

ADVERTISEMENT

<http://rd.yahoo.com/SIG=12cerl0at/M=258297.4155332.5363524.4049140/D=egroup
web/S=1705115386:HM/EXP=1068660030/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=770410076>

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]