Subject Re: [firebird-support] basic question for database design
Author Artur Anjos
Ulrich wrote:
> Hello,
>
> 1.) Are there any arguments for or against to use one generator for
> all tables, or should I use several generators? Or maybe one generator
> for every table?

I like global generators. One generator is enough, since the main
propose of it is to unique identify the row.

> Interbase data definition guide says 2.147.483.647 possible positive

Remember that sometimes you rollback, sometimes you delete, and some
numbers will be lost. If you will use just one generator, maybe int64
will be a better option.

> 2.) I have read something about the concept of meaningless primary
> indizes, but in master-detail relation of two tables, I use primary
> index of master table for defining master-detail relation. Do I break
> this concept with this? Do I have to add another data-column to define
> master-detail relation?

The recommendation is "don't use something with meaning to the user".
When you have a primary key defined by a generator, this will be an ID,
that it's excellent for a master/detail relation.

Artur Anjos