[BioSQL-l] FK cascades

Thomas Down td2@sanger.ac.uk
Wed, 21 Aug 2002 23:51:10 +0100


On Wed, Aug 21, 2002 at 03:18:56PM -0700, Hilmar Lapp wrote:
> Maintaining is FK integrity in the SW layer is not only inevitably 
> unsafe and prone to slip, it also makes for _ugly_ code in the 
> adaptors.
> 
> I don't know exactly what Postgres is capable of, but I'd assume it 
> enforces FK constraints and can do cascading deletes. Oracle does. 
> It seems InnoDB from one of the most recent versions on can do, too.

Yes, PostgreSQL (since at least version 7.1) supports foreign
key constraints with a range of actions including "on delete cascade".
I think the syntax is the same as Oracle.

Using this could certainly clean a few things up, and I'm
all for it.  I'm not a regular MySQL user, though, and am
not sure what the current status of the more featureful
MySQL table handlers is.  Earlier this year, I seem to remember
hearing reports that InnoDB was a bit buggy.  It may well have
been fixed by now, though.


      Thomas.