Re: Conflicts in Relationships

From: Jan Hidders <jan.hidders_at_pandora.be>
Date: Thu, 18 Sep 2003 22:05:31 GMT
Message-ID: <L_pab.27226$FB5.1534088_at_phobos.telenet-ops.be>


bill_dev wrote:
>
> ..and just to confuse you further, my thoughts were that some recursive
> function would be needed to traverse all existing relationships with the
> participating tables of any newly proposed relationship. And the purpose
> of that would be to verify that the newly proposed relationship would
> coexist with existing ones without conflict.
>
> I've been told this may involve heavy network modeling algorithms (that
> would be beyond my understanding - entirely possible) and the best
> course of action may be to let the user's query fail and put the
> responsibility on them. But I'm not ready to give up on this yet. So any
> assistance would be appreciated....Thx

It's not very simple, but also not very complicated. Just think of the join as a graph: nodes are the relations, edges are join conditions. You start from the node/relation that has to be fully in the result. If there is a simple path (no cycles) that starts in this node and ends with the edge (R1,R2) then the join between R1 and R2 should be an outer join on the side of R1.

  • Jan Hidders
Received on Fri Sep 19 2003 - 00:05:31 CEST

Original text of this message