Re: Surrogate VS natural keys

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Surrogate VS natural keys
Date: 2007-06-20 16:14:50
Message-ID: Pine.LNX.4.64.0706200912410.22882@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2007-06-20 16:18:30 Re: Surrogate VS natural keys
Previous Message Joshua D. Drake 2007-06-20 16:05:11 Re: Surrogate VS natural keys