Subject Re: [firebird-support] RE: Auto Increment
Author Lester Caine
Mick Arundell wrote:

> Of course all row id increments use triggers.
> With Auto increment you don't write a trigger but the database server does.
> It is the only way Auto increment can work.
>>I can only imagine that this would also increase Insert performance greatly
>>also, as the Inserts won't have to respond to trigger events.

There are as just as many examples of using the generator value
directly, even before posting to the table. AUTO-INCREMENT is a poor
substitute for a correctly configured Primary Key with links to a
related generator.

Most of my applications generate the information to be saved, then when
a save is requested, the generator value is obtained, and a new record
posted. Since you already have the Primary Key, any activity related to
it can be managed without having to come up with some method of
obtaining the new AUTO_INCREMENT value from the database, and pospoening
further processing until that excercise completes :)

Lester Caine
L.S.Caine Electronic Services