[development] Foreign keys in Drupal 6
Angela Byron
drupal-devel at webchick.net
Mon Jun 4 03:23:32 UTC 2007
On 3-Jun-07, at 11:14 PM, David Strauss wrote:
> 3. Configure foreign keys as CASCADE on delete and have extra PHP run
> whenever a query manipulates a database using MyISAM. Basically,
> whenever a DELETE query gets sent to a MyISAM system, we would convert
> it to a SELECT query to identify the rows that would be deleted. Then,
> we would delete the records attached with foreign keys. Finally, we
> would run the original DELETE query. This would have to be recursive.
Is MySQL's MyISAM the only database type is brain-dead when it comes
to foreign key constraints? Or do some of the other light-weight dbs
(firebird, sqlite) suffer this same problem? If so, we might need a
way to handle this at the database abstraction layer. (Which might
not be a bad idea either way.)
-Angie
More information about the development
mailing list