Re: The Practical Benefits of the Relational Model
Date: Wed, 02 Oct 2002 06:34:05 GMT
Message-ID: <3D9A9328.8060102_at_earthlink.net>
Paul Vernon wrote:
> Out of interest, how does D4 insert into this view?
>
> (A UNION B) MINUS (A INTERSECT B)
>
> It seems to me to be entirely arbitrary to insert into A rather than B, or
> vis-versa, and only slightly less arbitrary to not allow any inserts at
> all.
The relations A and B must be type compatible (union compatible, have the same type). Assume they have relation predicates PA and PB. To be acceptable for insert into the view expression above, the set of tuples presented must satisfy the predicate for the view as a whole as well as satisfying the predicate for the relation(s) into which it is inserted separately. Using the algorithms given in C J Date "Relational Database Writings 1991-1994", each tuple in the set must either belong to "A but not the part of A that is also in B" or "B but not the part of B that is also in A". These are completely disjoint sections of the Venn diagram for the the view expression, so the placement of each tuple is unambiguous -- it either goes into A or into B but there is no possibility of going into both.
So, that's what I'd expect D4 or Alphora to do...
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix 1.00.PC2 -- http://dbi.perl.org/Received on Wed Oct 02 2002 - 08:34:05 CEST
