Re: When to use compound PK instead of a FK? - Mailing list pgsql-general

From Ron Johnson
Subject Re: When to use compound PK instead of a FK?
Date
Msg-id 45C8104E.7010902@cox.net
Whole thread Raw
In response to When to use compound PK instead of a FK?  ("Jamie" <jjbegin@gmail.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/04/07 09:48, Jamie wrote:
> I typically use compound primary keys when creating a table that
> represents a many-to-many relationship. I was wondering if anyone else
> had other situations in which you would use a compound PK? Why do you
> use it instead of just a foreign key?

We use multi-segment PKs all the time.  Is that what you meant by
"compound PK"?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFyBBOS9HxQb37XmcRAiVCAKC6OgW8uBrm5xE9idWrHjzIC/Vv9ACeOM3Q
ManPjPaX0eVo+TKmg6YvOQg=
=EEH9
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: "Jim C."
Date:
Subject: Re: Production systems beware: U.S. Daylight Savings Time comes at a new time this year
Next
From: "Gurjeet Singh"
Date:
Subject: Re: Locking question?