Re: implied foreign keys
[prev]
[thread]
[next]
[Date index for 2004/10/01]
On Fri, Oct 01, 2004 at 08:35:10AM -0700, Josh Peterson wrote:
> Let me see if I understand you clearly. Your statement implies that
> has_a always points to a primary key. What I've asked is if you can
> imply foreign key relationships on non-PK columns. If your statement's
> accurate, then there's no way to handle foreign keys on non-PK columns.
I believe you understand correctly. I would have thought that a primary
key had to be pointing to a PK field. However, upon googling for
details, it seems that some references[1,2] consider a foreign key to
point to a primary key; others[3] are saying that a foreign key could
point to a non-PK field as you are doing. Does anyone know if there a
definitive answer?
William
[1] http://en.wikipedia.org/wiki/Foreign_key
[2] http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,,sid63_gci978088,00.html
[3] http://searchdatabase.techtarget.com/sDefinition/0,,sid13_gci902816,00.html
--
Knowmad Services Inc.
http://www.knowmad.com