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