Maintaining state constraints in relational databases: a proof theoretic basis

If a relational database is required to satisfy a set of integrity constraints, then when the database is updated, one must ensure that it continues to satisfy the constraints. It is desirable not to have to evaluate each constraint after each update. A method is described that takes a constraint <italic>C</italic> and a class of updates, and either proves that an update in the class cannot violate <italic>C</italic>, or produces a formula <italic>C'</italic> (a complete test) that is satisfied before the update if and only if <italic>C</italic> would continue to be satisfied were the update to occur. <italic>C'</italic> is frequently much easier to evaluate than <italic>C</italic>. In addition, a formula <italic>D</italic> (a sufficient test) is sometimes produced such that if <italic>D</italic> is satisfied before the update, then <italic>C</italic> would continue to be satisfied were the update to occur. The method is proved correct. The method is substantially more general than other reported techniques for this problem. The method has been implemented, and a number of experiments with the implementation are presented.