Re: foreign vs primary key

From: Leandro Guimarães Faria Corsetti Dutra <leandrod_at_mac.com>
Date: Thu, 20 Sep 2001 18:35:08 -0300
Message-ID: <3BAA610C.1080604_at_mac.com>


Ewald Börger wrote:

> mikeg wrote:
>

>>identify the foreign key?  How are they used?   Aren't primary keys enough?

>
> Normally: yes, up till yesterday I never bothered (mysql doesn't even
> have support for it)... now I'm going to have an application *guess*
> what columns contain foreign keys 'cause the production database (SQL
> Server) I need to transfer doesn't have explicit foreign keys defined
> (even worse: columns don't even have consequent names :(

        Don't mess two issues. Your SQL Server database may be ill designed, but FKs are essential. Each FK you fail to declare is either a potential integrity danger to your database, or (and) lots of procedural, hard-to-optimize code you have to keep at the application layer.

        MySQL isn't a proper SQL -- not even a proper DBMS, much less RDBMS.

-- 
  _
/ \ 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.com
Received on Thu Sep 20 2001 - 23:35:08 CEST

Original text of this message