Leandro Guimarães Faria Corcete DUTRA <[EMAIL PROTECTED]> writes: > Certainly decoupling presentation from storage would be nice, but even before > that generalised use of surrogate keys seems to me a knee-jerk reaction.
I hate knee-jerk reactions too, but just think of all the pain of people dealing with databases where they used Social Security numbers for primary keys. I would never use an attribute that represents some real-world datum as a primary key any more. In my experience there are very few occasions where I want a real non-sequence generated primary key. I've never regretted having a sequence generated primary key, and I've certainly had occasions to regret not having one. -- greg ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org