Re: foreign vs primary key
From: Leandro Guimarães Faria Corsetti Dutra <leandrod_at_mac.com>
Date: Thu, 20 Sep 2001 00:18:06 -0300
Message-ID: <3BA95FEE.8050102_at_mac.com>
Date: Thu, 20 Sep 2001 00:18:06 -0300
Message-ID: <3BA95FEE.8050102_at_mac.com>
mikeg wrote:
>
> Thanks, I can see that but what is the significance? Why is it necessary to
> identify the foreign key? How are they used? Aren't primary keys enough?
You really, really, really should read at least Chris J Date's An Introduction to Database Systems.
Or in other words, RTFM.
But the idea is to enforce the integrity of the database, more specifically referential integrity, not allowing a child without a parent.
In fact even FKs are not enough. A proper, complete relational system (*not* SQL!) would in fact do for a complete rules system.
-- _ / \ Leandro Guimarães Faria Corsetti Dutra +55 (11) 246 96 07 \ / http://geocities.com./lgdutra/ BRASIL +55 (43) 322 89 71 X http://tutoriald.sourceforge.net./ mailto:lgcdutra_at_terra.com.br / \ Campanha fita ASCII, contra correio HTML mailto:leandrod_at_mac.comReceived on Thu Sep 20 2001 - 05:18:06 CEST
