Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-04 Thread rlee0001
Martijn van Oosterhout wrote: > On Sun, Oct 01, 2006 at 07:48:14PM -0700, rlee0001 wrote: > > For example, if I key "employee" by Last Name, First Name, Date > > of Hire and Department, I would need to store copies of all this data > > in any entity that relates to an employee (e.g. payroll, benef

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-02 Thread Martijn van Oosterhout
On Sun, Oct 01, 2006 at 07:48:14PM -0700, rlee0001 wrote: > For example, if I key "employee" by Last Name, First Name, Date > of Hire and Department, I would need to store copies of all this data > in any entity that relates to an employee (e.g. payroll, benefits and > so on). In addition, if any

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-02 Thread rlee0001
Tom Lane wrote: > "rlee0001" <[EMAIL PROTECTED]> writes: > > ... I know, for example, that by default PostgreSQL assigns every record a > > small unique identifier called an OID. > > Well, actually, that hasn't been the default for some time, and even if > you turn it on it's not guaranteed unique

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-02 Thread rlee0001
Stephan Szabo wrote: > On Sun, 1 Oct 2006, rlee0001 wrote: > > > I know, for example, that by default PostgreSQL assigns every record a > > small unique identifier called an OID. It seems reasonable then, that > > when the DBA creates a cascading foreign key to a record, that the DBMS > > could, i

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread Stephan Szabo
On Sun, 1 Oct 2006, rlee0001 wrote: > I know, for example, that by default PostgreSQL assigns every record a > small unique identifier called an OID. It seems reasonable then, that > when the DBA creates a cascading foreign key to a record, that the DBMS > could, instead of storing the record's en

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread Tom Lane
"rlee0001" <[EMAIL PROTECTED]> writes: > ... I know, for example, that by default PostgreSQL assigns every record a > small unique identifier called an OID. Well, actually, that hasn't been the default for some time, and even if you turn it on it's not guaranteed unique without additional steps, a

[GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread rlee0001
I know this is an old topic and also a religious one so I won't get into the debate, but I thought up one possible solution that would make almost everybody happy and was wondering if any PostgreSQL hackers out there had any thoughts. I was wondering if, considering that an entity can only have a