Aim: to construct alternative possreps on tuples of relations in order to investigate updates on join views
Let (R,S) denote a possrep with components R,S which are relations. Assume there are no constraints on R or S.
Let (A,B,C) denote a possrep with components A,B,C which are relations with
heading(A) = heading(R) union heading(S) heading(B) = heading(R) heading(C) = heading(S)
Let the following four constraints on (A,B,C) be defined:
A = (B UNION (A { heading(R) } )) JOIN (C UNION (A { heading(S) } )) (A JOIN B){} = TABLE_DUM (A JOIN C){} = TABLE_DUM (B JOIN C){} = TABLE_DUM
Claim: There is a bijection between these two possreps, with mappings in each direction as follows:
Mapping from (R,S) to (A,B,C) : A = R JOIN S B = R MINUS ( (R JOIN S){ heading(R) } ) C = S MINUS ( (R JOIN S){ heading(S) } ) Mapping from (A,B,C) to (R,S) : R = B UNION (A { heading(R) } ) S = C UNION (A { heading(S) } )
Note that deletions from A (i.e. R JOIN S) cannot break the given constraints over (A,B,C), and deletion of a tuple from A with no change to either B or C has the effect of removing a tuple from both R and S.
It follows that possrep (A,B,C) uses the C.Date approach to deletion from a join which was motivated by symmetry.
Let relations R,S be associated with predicates
pR(X,V) :- X is known to have volume V. pS(X,M) :- X is known to have mass M.
Most of the time both volume and mass are known, so most of the information fits into relation A = (R JOIN S), which has predicate:
pA(X,V,M) :- X is known to have volume V and mass M.
Let a user find it useful to view relation A and also relations B,C associated with predicates
pB(X,V) :- X is known to have volume V and the mass is unknown pC(X,M) :- X is known to have mass M and the volume is unknown.
B and C allow the user to view the objects in the database with missing information.
I note that a deletion from A (i.e. R JOIN S) wouldn't seem ambiguous to a user that doesn't expect a deletion from A to implicitly change either B or C.
So to the extent that A,B,C are recognised as components of a particular possrep, deletions from A don't seem ambiguous at all.
I'm curious to know whether there are other straightforward possreps for (R,S) where a deletion from (R JOIN S) would have a different behaviour.
I imagine a bijection involving a mapping from (R,S) to (R, R JOIN S, S MINUS ( (R JOIN S){ heading(S) } ) ) can be defined, in which case a deletion from R JOIN S involves deletion from S but not R.