Hello,

The documentation often mentions that foreign key support in mysql is
not implemented because it slows down the database server. The argument
is that since the applications built on top of mysql have to check for 
database integrity constraints (ICs) it is redundant for the database
to perform these checks as well. However it would be very convenient
to have a setting in /etc/my.cnf for enabling/disabling the checking
of foreign keys with the default being off in the interest of speed.
The reason a user would want this is that if there is a lot of data
in an existing database then the application developer does not want
the application to mess up the data due while the application is not
yet stable. Thus, in such a scenario, foreign keys are helpful. Thus
in addition to a setting in /etc/my.cnf it would be helpful to have
commands such as "ENABLE FOREIGN KEYS" and "DISABLE FOREIGN KEYS"
allowing more flexibility on multiuser systems. The same mechanism
could be use to enable/disable CHECK constraints including CHECK
constraints involvins SELECT statements. These could always be
enforced/not enforced with commands such as "ENABLE CHECK IC"
and "DISABLE CHECK IC" or something similar, with the default
set to DISABLED in the intrest of speed, but with the syntax
in the table data definition language (DDL) still being parsed
and accepted in both cases, as for foreign keys.

Thank you for mysql,

Neil Zanella
[EMAIL PROTECTED]


---------------------------------------------------------------------
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