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

Scott Walters scott at illogics.org
Wed Apr 21 17:13:16 CDT 2004


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