As an example, we show a base table
and two derived tables
and
in Figure 2.
has two uncertain attributes
and
that are jointly distributed.
is derived by projecting
on
satisfying
.
is simply a projection of attribute
on
.
is a resulting table after joining
and
. As we can see from
,
the pair
has a probability
rather than
and the pair
is not even
in the result. If we had looked at
and
only without checking their histories (both of them come from
and their attributes are correlated in
), we could have made mistakes about the resulting tuples after
joining the two tables. Since attribute
and
are historically jointly distributed, we need to
refer to the original distribution in
when performing the join operation on
and
. The pair
has a probability
according to the joint distribution in
and the pair
is not
a valid pair (cannot appear in any possible worlds) because it is not in the original distribution.
Note that the deletion of a base tuple will cause dependency sets of its derived tuples to lose their ancestor information. Thus, while deleting a tuple from the base table, we first check if any other tuple in the database is referencing any dependency set within the tuple. If there is a reference, we delete the tuple but keep the dependency set and its pdf as a phantom node until its reference count falls to zero.
Rohit Jain 2011-08-02