Phoenix.pm: "Why Not To Use Foreign Keys" ?

Andrew Johnson aj at exiledplanet.org
Thu Apr 22 02:12:16 CDT 2004


Well, remember, MySQL will let you declare foreign keys, it just won't 
/enforce/ them.  Wrap your head around /that/ for a little while...

I _do_ like MySQL though.  It's fast, fast, fast, and uses more or less 
standard SQL.  Though for more heavy duty relational db work, I'm on the 
Oracle bandwagon, primarily because it makes the paychecks clear now.

Scott Walters wrote:

>Well, I'm on the Postgres bandwagon myself, but most people can't design a
>half way relationtional schema in the first place, so either their lone table
>has no foreign keys to relate to or their quagmire has so many problems that
>losing data is the tip of the iceberg. Continuing with the bad habit of using
>myself as anecdotal evidence, I've cleaned up a number of bad Access database
>*and* MySQL databases. 
>
>The original story of MySQL is somewhat telling though. They just needed
>to do simple reports on vast amounts of data that chained weekly and only
>constituted a few tables. So that's what MySQL was built for ;)
>
>-scott
>
>On  0, eden li <eden.li at asu.edu> wrote:
>  
>
>>I'm surprised they still haven't implemented it.  Hell even Microsoft Access lets you do foreign keys.  The reasons they give for not implementing them are kind of bogus.  When you design a sufficiently complex schema, it's nice to be able to depend on the database to keep certain things about the schema correct.  All the problems they mention with foreign keys can be taken care of by good design.
>>
>>It seems the MySQL developers don't trust us with being able to make the right decisions about using foreign keys in the right places.  Maybe that's the reason I haven't touched mysql in so long...
>>
>>
>>Bill Lindley wrote:
>>    
>>
>>>...linked from a Slashdot thread, it's the MySQL developers eating 
>>>humble pie... funny reading in a 'cvs commit' diff..
>>>
>>>much more at
>>>http://lists.mysql.com/internals/1771 
>>>      
>>>




More information about the Phoenix-pm mailing list