Re: Avoiding surrogate keys

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Avoiding surrogate keys
Date: 2010-04-21 19:14:21
Message-ID: 1271877261.2857.0.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2010-04-21 at 15:07 -0400, Bill Moran wrote:
> I'd use an ENUM for the status, as that's not liable to change.
>
> The only problem I see with avoiding the surrogate key for the country
> is that the table might require more disk space if a lot of the country
> names end up being very long.
>

Yeah but that isn't generally a problem now and the gain he gets from
the lack of join performance is more than worth it.

Joshua D. Drake

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2010-04-21 19:17:25 Re: Avoiding surrogate keys
Previous Message Bill Moran 2010-04-21 19:07:35 Re: Avoiding surrogate keys