List:General Discussion« Previous MessageNext Message »
From:Jochem van Dieten Date:June 2 2004 1:23pm
Subject:Re: RI enforcement and m2m relationships.
View as plain text  
SGreen@stripped wrote:
> I don't see how you can possibly hope to satisfy two mutually dependent
> constraints at the exact same time. It's a chicken-and-egg scenario. If you
> can't create your vacancy record first (to get its PK value) you won't be
> able to create the new record in your supervision table.
(..)
> It's not hard to do what you want,  but it requires logic external to the
> storage engine itself to enforce that kind of relationship.

In databases this is usually solved in the storage engine itself 
by deferring constraint checking to transaction commit. 
Unfortunately, MySQL doesn't offer deferred constraints (haven't 
seen them on the ToDo list either).

Jochem

Thread
RI enforcement and m2m relationships.IAH-C)2 Jun
Re: RI enforcement and m2m relationships.SGreen2 Jun
  • Re: RI enforcement and m2m relationships.Jochem van Dieten2 Jun