Thanks Jared, that's good to know. It appears that version of SQLite
only came out in October 2009. Kudos to the contributors of SQLite
who made that feature possible! And thanks for pointing it out.
There's virtually no reason to avoid using RI constraints now.
The reasons to use MyISAM are dwindling. It used to be faster than
InnoDB, but this is less and less true now that the performance of the
InnoDB plugin storage engine has improved so much. If you want to use
the FULLTEXT index which only supports MyISAM, other options like Solr
and Sphinx are available and probably better.
Regards,
Bill Karwin
On Mar 29, 2010, at 9:21 AM, Jared Williams wrote:
Sqlite 3.6.19 and later have RI,
http://www.sqlite.org/foreignkeys.html .
Jared
-----Original Message-----
From: Bill Karwin [mailto:[email protected]]
Sent: 29 March 2010 17:03
To: [email protected]
Subject: Re: [fw-general] recurse on cascade delete
I regret implementing the cascading delete in Zend_Db_Table
even for one level. It was hard to do, required a lot of
code, and still doesn't work. Even fixing ZF-1103 won't be
enough. It's not possible to ensure data consistency when
cascading operations are implemented in PHP code.
You should implement cascading delete or cascading update by
defining
SQL constraints in your database. I know there are a couple of
technologies that don't support RI constraints (MyISAM,
SQLite). If you need cascading delete or update, you should
define triggers in the database, or else change to some other
storage engine.
Regards,
Bill Karwin
On Mar 29, 2010, at 3:54 AM, Guillaume ORIOL wrote:
Hi,
I was working on an application that uses cascade delete and
discovered a bug that was already known and reported.
I was wondering why the corresponding issue
http://zendframework.com/issues/browse/ZF-1103
had not been closed and included in a previous ZF release,
as a patch
was provided and no new activity was recorded on the ticket since
january the 2nd.
The lack of a consistent ON DELETE mechanism is rather awkward.
Best regards
--
Guillaume ORIOL
Software engineer
Technema