FOREIGN KEYs by themselves make it faster and easier to validate that your
code is correctly maintaining referrential integrity.

They also let O/R mappers do more of the work in generating code for
accessing your data (Blatant Plug: http://freshmeat.net/projects/easyorm/ --
EasyORM is an O/R mapper that introspects a MySQL DB and generates PHP code
(eventually it'll also do Java (JDBC and EJB) and Perl.), and uses "hints"
from an XML document you provide to build object-oriented code to access
your schema.  It's really crude right now -- the version in development is
vastly more robust -- but we're using it successfully in our production
environment.)

FOREIGN KEYs combined with CASCADE ON DELETE/UPDATE (which InnoDB does not
support yet) make it easier to write correct code:  It manages
changes/removals of dependant objects so you don't have to even think about
it, let alone code it.

-JF

> -----Original Message-----
> From: Richard Clarke [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 09, 2002 5:11 AM
> To: [EMAIL PROTECTED]
> Subject: Re: InnoDB tables
>
>
> Luke,
>
>     How exactly will the foreign keys save you time? Please explain.
>
> Ric.
>
> ----- Original Message -----
> From: "Luke van Blerk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 09, 2002 9:17 AM
> Subject: InnoDB tables
>
>
> > Hi everyone,
> >
> > I've been reading up about InnoDB tables and they seem to have lots of
> > advantages. I'm particularly interested in using the foreign
> keys as this
> > will save me some much need time. In the benchmark tests on the InnoDB
> > website they show up faster than MyISAM tables but will foreign
> keys have
> a
> > slow down effect? And are there any issues I need to know about before
> > switching to InnoDB tables?
> >
> > Thanks in advance
> > Luke van Blerk
> >
> > mysql
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to