Re: MySQL and foreign keys
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: MySQL and foreign keys

From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spamyourself.com>
Date: Wed Sep 14 2005 - 10:09:30 CEST

Steve wrote:

>
>> I was baffled to see that I can make Foreign Keys, but they are actually
>> never checked by the mySQL engine.
>
>> Am I mad, or does MySQL not support Foreign Keys?
>> And if so: Why is it that MySQL is so popular?
>
> Erwin:
>
> It depends what table type you are using. MySQL lets you specify
> foreign keys for compatibility, but ignores them unless you are using
> InnoDB tables.
>
> The main reasons for widespread MySQL adoption? It is fast and simple,
> it has (or had) better documentation and support, lots of 3rd party
> tools. For lightweight web apps where you don't need transactions it is
> a good choice.
>
> ---
> Steve

Thank you Steve. InnoDB-tables solves that problem.
Now I have to contact that provider to ask them to implement it, or just
learn my friend to program wisely so he doesn't need FK's.
:-)

Thanks.

Regards,
Erwin Moller
Received on Tue Oct 18 02:23:21 2005