| From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
|---|---|
| To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Surrogate VS natural keys |
| Date: | 2007-06-20 16:18:30 |
| Message-ID: | 507851.1047.qm@web31806.mail.mud.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
--- "Joshua D. Drake" <jd(at)commandprompt(dot)com> wrote:
> The value of a surrogate key is easy retrieval and really has nothing to
> do with normalization or proper modeling.
>
> I often add a surrogate key, even when one is not required just so I
> don't have to worry about have a 4 element where clause.
I've often wondered about this. Since PostgreSQL allows FOREIGN KEYS to be referenced from UNIQUE
(non-primary) natural keys, couldn't the schema be designed so that every table has a surrogate
PRIMARY KEY and yet still maintain the relationships using UNIQUE natural keys.
Would a design like this be practical?
Regards,
Richard Broersma Jr.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joshua D. Drake | 2007-06-20 16:28:15 | Re: Surrogate VS natural keys |
| Previous Message | Rich Shepard | 2007-06-20 16:14:50 | Re: Surrogate VS natural keys |