Search Postgresql Archives

Re: IS it a good practice to use SERIAL as Primary Key?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 23, 2006, at 10:23 AM, Ron Johnson wrote:
I'm one of those who thinks that a (possibly multisegment) natural
key *does* exist, and that if you think it doesn't, your design is
wrong.

I agree, but that doesn't mean you want to be spreading that multi- field key throughout your database. For example, origination, destination, flight_number, and date together make a unique key for a segment of a flight. But that doesn't mean you want to be storing all that info in every other table in the database that references a segment. Not only does moving all that data around become non- trivial, writing all that stuff into all the joins is error-prone (not to mention a PITA).
--
Jim Nasby                                            jim@xxxxxxxxx
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux