Subject | Re: [firebird-support] basic question for database design |
---|---|
Author | Artur Anjos |
Post date | 2004-04-30T18:00:19Z |
Ulrich wrote:
propose of it is to unique identify the row.
numbers will be lost. If you will use just one generator, maybe int64
will be a better option.
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
> Hello,I like global generators. One generator is enough, since the main
>
> 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?
propose of it is to unique identify the row.
> Interbase data definition guide says 2.147.483.647 possible positiveRemember 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 primaryThe recommendation is "don't use something with meaning to the user".
> 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?
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