We use a datalog-like language. The representation of the various components is as follows:
[p('X','Y'),q(c,'Y')] represents the integrity constraint ''false <- p(X,Y) /\ q(c,Y)''. Note that an integrity constraint represented by the empty list [] means false.
[] means true. To represent the constraint theory false, the predicate false is used.
[p(?a,?b),~q(c)] represents the pseudo-SQL transaction
BEGIN TRANSACTION INSERT (?a,?b) INTO p; DELETE FROM q WHERE column1='c'; END TRANSACTION
(Head:-Body), where Head is a literal and body is a literal or a sequence of literals separated by commas. Example (p('X'):-q('X'),'X'~=c).
The simplification procedure is available in different flavors. See the examples for further details.
simp(+Update,+ExtraHypotheses,+ConstraintTheory,+ViewDefinitions,-Simplification)
Update is an update transaction (a list of literals)
ExtraHypotheses is a set of hypotheses integrity constraints, not included in ConstraintTheory, that are always known to hold in the database (a list of lists of literals).
ConstraintTheory is the original set of integrity constraints to be checked (a list of lists of literals)
ViewDefinitions is the intensional database, i.e., a set of rules that define the views of the database.
simprec.
Simplification is the returned simplified set
simp(+Update,+ExtraHypotheses,+ConstraintTheory,-Simplification)
simp/5, but it is assumed here that there are no views.
simp(+Update,+ConstraintTheory,-Simplification)
simp/4, but it is assumed that there are no views and no extra hypotheses on the database.
simprec(+Update,+ExtraHypotheses,+ConstraintTheory,+ViewDefinitions,-Simplification,-NewViewDefinitions)
simp/5, but the view definitions can be recursive and NewViewDefinitions is a set of new view definitions that need to be added to the database in order to evaluate the Simplification.
simp_no_dup(+Update,+ConstraintTheory,-Simplification)
simp/3 but with the implicit extra hypotheses that a tuple which is already in the database cannot be added again
simp_post(+Update,+ConstraintTheory,-Simplification)
simp/3 but Simplification has to be tested in the updated database instead of the state before the update.
Some features, like the ability to express rule-based updates, as well as some of the internal predicates described in the references are presently undocumented.
Last modification October 2004 - Davide Martinenghi