Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: foreign vs primary key

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@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@terra.com.br
/ \ Campanha fita ASCII, contra correio HTML    mailto:leandrod_at_mac.com
Received on Thu Sep 20 2001 - 16:35:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US