When to use compound PK instead of a FK?

From: "Jamie" <jjbegin(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: When to use compound PK instead of a FK?
Date: 2007-02-04 15:48:28
Message-ID: 1170604108.880422.22010@j27g2000cwj.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-02-04 17:15:40 Re: ERROR: missing cache data for cache id 27
Previous Message Jorge Godoy 2007-02-04 15:24:38 ERROR: missing cache data for cache id 27