On 2009-05-22, Brandon Metcalf wrote:
> g == gryz...@gmail.com writes:
>
> g> you should use it, whenever you need db to keep its own key internally.
> g> Advantage of sequence is also the fact, that you can have the sequence
> g> value used on different columns/tables .
>
> g> My rule of thum
On Fri, May 22, 2009 at 9:04 AM, Brandon Metcalf
wrote:
> s == s...@samason.me.uk writes:
>
> s> On Fri, May 22, 2009 at 08:41:46AM -0500, Brandon Metcalf wrote:
> s> > I am looking for criteria on deciding whether or not to use a serial
> s> > (auto-incrementing) key for rows in a table.
>
>
On Fri, May 22, 2009 at 3:33 PM, Sam Mason wrote:
> Not that I'm aware of; it's a fuzzy design choice with benefits and
> costs for either option. There are lots of people who arbitrarily
> pick one side which tends to make things worse, using one or the other
> *exclusively* will add complicatio
s == s...@samason.me.uk writes:
s> On Fri, May 22, 2009 at 08:41:46AM -0500, Brandon Metcalf wrote:
s> > I am looking for criteria on deciding whether or not to use a serial
s> > (auto-incrementing) key for rows in a table.
s> Wow, that's the second time today someone asked that!
s> > Intui
On Fri, May 22, 2009 at 3:26 PM, Roderick A. Anderson
wrote:
> Brandon Metcalf wrote:
>> That does help. So, in my example of a table consisting of rows for
>> each periodic table element, the atomic number would suffice as a
>> unique key since, well, it's unique and not going to change. Right?
Brandon Metcalf wrote:
g == gryz...@gmail.com writes:
g> you should use it, whenever you need db to keep its own key internally.
g> Advantage of sequence is also the fact, that you can have the sequence
g> value used on different columns/tables .
g> My rule of thumb is , in that case: as lo
On Fri, May 22, 2009 at 08:41:46AM -0500, Brandon Metcalf wrote:
> I am looking for criteria on deciding whether or not to use a serial
> (auto-incrementing) key for rows in a table.
Wow, that's the second time today someone asked that!
> Intuitively, it's pretty clear to me when a serial index i
2009/5/22 Brandon Metcalf :
> That does help. So, in my example of a table consisting of rows for
> each periodic table element, the atomic number would suffice as a
> unique key since, well, it's unique and not going to change. Right?
Well, yes :)
At least that's my opinion and experience.
No
g == gryz...@gmail.com writes:
g> you should use it, whenever you need db to keep its own key internally.
g> Advantage of sequence is also the fact, that you can have the sequence
g> value used on different columns/tables .
g> My rule of thumb is , in that case: as long as it is a short type
you should use it, whenever you need db to keep its own key internally.
Advantage of sequence is also the fact, that you can have the sequence
value used on different columns/tables .
My rule of thumb is , in that case: as long as it is a short type (not
of toastable, or/and variable length), and
10 matches
Mail list logo