X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 953799FA65C for ; Fri, 7 Jul 2006 02:51:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 44848-02 for ; Fri, 7 Jul 2006 02:51:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by postgresql.org (Postfix) with ESMTP id 4D7DF9FA66C for ; Fri, 7 Jul 2006 02:51:16 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id g2so7745nfe for ; Thu, 06 Jul 2006 22:51:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=gMvfzaMYXnpI8jZZbJbcDb23RKddAoeIR0FNm6xuNhsEuayp3sq1xPwdvFTx8h6eKaRaMI4J5ojyXoNpPYa5KLlTcOPitUM6OHPq3DwQr7PNJB/S1diOq0tJtsOkqFD9c+GvKVUuyCzQwxCygnIhSA5b9p9JB1jV+1DiALeXJjk= Received: by 10.78.122.11 with SMTP id u11mr513790huc; Thu, 06 Jul 2006 22:51:15 -0700 (PDT) Received: by 10.78.29.2 with HTTP; Thu, 6 Jul 2006 22:51:14 -0700 (PDT) Message-ID: Date: Fri, 7 Jul 2006 00:51:14 -0500 From: "Aaron Bono" To: "operationsengineer1@yahoo.com" Subject: Re: Alternative to serial primary key Cc: "David Clarke" , pgsql-sql@postgresql.org In-Reply-To: <20060707052511.87859.qmail@web33302.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_105659_19235259.1152251474977" References: <12b7ac1e0607061330o34adbd6ds9bd624d3889c7fe7@mail.gmail.com> <20060707052511.87859.qmail@web33302.mail.mud.yahoo.com> X-Google-Sender-Auth: d42faea9da9c8096 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/77 X-Sequence-Number: 25651 ------=_Part_105659_19235259.1152251474977 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/7/06, operationsengineer1@yahoo.com wrote: > > > Plus I feel I would be remiss in not > > exploring an > > alternative to the serial key. > > why? it is a tried and true method. Actually, there are two reasons I think it good for someone new to SQL to explore this option. First of all, it is very educational. Secondly, it is the person who stands up and says, "I know everyone does it this way, but what if we did it that way?" who has a chance of discovering something new. For this particular topic however, using the serial is very easy and using a hash is not only error prone but much more difficult. It is good to see different philosophies about foreign keys though! -Aaron Bono ------=_Part_105659_19235259.1152251474977 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/7/06, operationsengineer1@yahoo.com <operationsengineer1@yahoo.com> wrote:
> Plus I feel I would be remiss in not
> exploring an
> alternative to the serial key.

why?  it is a tried and true method.

Actually, there are two reasons I think it good for someone new to SQL to explore this option.  First of all, it is very educational.  Secondly, it is the person who stands up and says, "I know everyone does it this way, but what if we did it that way?" who has a chance of discovering something new.

For this particular topic however, using the serial is very easy and using a hash is not only error prone but much more difficult.

It is good to see different philosophies about foreign keys though!

-Aaron Bono

------=_Part_105659_19235259.1152251474977--