>On Thu, 5 Apr 2001, Dennis Gearon wrote:
>
> > Date: Thu, 05 Apr 2001 14:24:25 -0700
> > From: Dennis Gearon <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Foreign Keys
> >
> > Are people using Mysql using foreign keys and how are they using them?
> > It seems that the way to use them is with the scripting language used to
> > access the database.
>
>bonjour,
>
>neither foreign keys nor need for foreign keys using mysql. Use WHERE
>clause.
A foreign key is a column (or columns) in a table that refers to a
key in another table. A foreign key contains only values in the
referenced key, or NULLs. Joins on referenced key/foreign key pairs
are very common, regardless whether the DBMS is MySQL, Oracle or
what-have-you.
What MySQL lacks, that many DBMSs have, are relational integrity
constraints that prevent you from inserting or altering values in a
foreign key that are not in the referenced key, or deleting the rows
in the referenced table that the foreign key refers to. This means
that the programmer has to be careful to avoid writing code that
creates orphan records, since MySQL won't prevent you from creating
them.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
---------------------------------------------------------------------
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