Subject Re: [firebird-support] Multiple generators
Author Ann W. Harrison
killerion wrote:
> In my DB, I need to keep track of different the offices of a company,
> and they want to be able to create or eliminate the offices, but
> depending on type, location, etc... they have different types of
> identifiers, now I want to know if I can use multiple generators for
> one table or do I need to manage them in different tables... if it is
> possible to do this how?

Sure. A generator is just a value source - not tied to a table or
a field, except through usage. Frequently, generators are used to
create unique identifiers as artificial primary keys. In that case,
they're normally tied to a field through a trigger, though there's
no reason why several different tables couldn't use the same
generator. Having one table use two different generators to create
artificial keys defeats the purpose, since two generators can
create the same value.

What exactly do you mean by "different types of identifiers"