Re: [GENERAL] Postgres, DB design, and object IDs (of any ilk)

2009-05-21 Thread Chris Browne
kentil...@gmail.com (Kenneth Tilton) writes: > Just looking for postgres "best practices" input from the veterans: OIDs are decidedly a bad idea; the difference between "natural" IDs and "surrogate" IDs is a general database issue that is fairly well documented in the literature and is not notably

Re: [GENERAL] Postgres, DB design, and object IDs (of any ilk)

2009-05-21 Thread Kenneth Tilton
Merlin Moncure wrote: On Thu, May 21, 2009 at 12:35 PM, Kenneth Tilton wrote: If the primary key of the customer table is cust_short_name and my DB reflects also customer departments, I can link a customer to its departments one of three ways: 1. The department table has a cust_short_name co

Re: [GENERAL] Postgres, DB design, and object IDs (of any ilk)

2009-05-21 Thread Grzegorz Jaƛkiewicz
I wouldn't trust OIDs, because they are 32bits for once. Secondly, Watch for index size. That's the main reason why (big)int as a key reference is a win over other types - at least in my general practice. And third advice, try different approaches, and queries - to figureout what would suit the so

Re: [GENERAL] Postgres, DB design, and object IDs (of any ilk)

2009-05-21 Thread Merlin Moncure
On Thu, May 21, 2009 at 12:35 PM, Kenneth Tilton wrote: > If the primary key of the customer table is cust_short_name and my DB > reflects also customer departments, I can link a customer to its departments > one of three ways: > > 1. The department table has a cust_short_name column and makes tha