Re: Surrogate VS natural keys - Mailing list pgsql-general

From Rich Shepard
Subject Re: Surrogate VS natural keys
Date
Msg-id Pine.LNX.4.64.0706200912410.22882@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Surrogate VS natural keys  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
On Wed, 20 Jun 2007, Martijn van Oosterhout wrote:

> While true in this simple case, it can quickly become more complicated if
> your relationship starts gaining attributes. For example, if you add start
> and stop dates, so the (player,club) combination is not unique anymore. If
> you track invoices, games or scores it may be easier to reference the
> relatioship via a surrogate key rather than copying the other IDs around
> everywhere.

   That's very true, Martijn. It did not seem to be the case in the original
post. When you add a time history and need to identify a player's team at a
specified point in time, it gets much more complicated. That's when reading
Rick Snodgrass' book helps a lot.

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Surrogate VS natural keys
Next
From: Richard Broersma Jr
Date:
Subject: Re: Surrogate VS natural keys