Subsumption and indexing in constraint query languages with linear arithmetic constraints

Bottom-up evaluation of a program-query pair in a constraint query language (CQL) starts with the facts in the database and repeatedly applies the rules of the program, in iterations, to compute new facts, until we have reached a fixpoint. Checking if a fixpoint has been reached amounts to checking if any “new” facts were computed in an iteration. Such a check also enhances efficiency in that subsumed facts can be discarded, and not be used to make any further derivations in subsequent iterations, if we use Semi-naive evaluation. We show that the problem of subsumption in CQLs with linear arithmetic constraints is co-NP complete, and present a deterministic algorithm, based on the divide and conquer strategy, for this problem. We also identify polynomial-time sufficient conditions for subsumption and non-subsumption in CQLs with linear arithmetic constraints. We adapt indexing strategies from spatial databases for efficiently indexing facts in such a CQL: such indexing is crucial for performance in the presence of large databases. Based on a recent algorithm by C. Lassez and J.-L. Lassez for quantifier elimination, we present an incremental version of the algorithm to check for subsumption in CQLs with linear arithmetic constraints.

[1]  Marianne Baudinet,et al.  On the representation of infinite temporal data and queries (extended abstract) , 1991, PODS '91.

[2]  Roland H. C. Yap,et al.  The CLP( R ) language and system , 1992, TOPL.

[3]  Michael J. Maher,et al.  On Fourier's algorithm for linear arithmetic constraints , 1992, Journal of Automated Reasoning.

[4]  Gabriel M. Kuper,et al.  Constraint Query Languages , 1995, J. Comput. Syst. Sci..

[5]  Divesh Srivastava,et al.  Pushing constraint selections , 1992, J. Log. Program..

[6]  Peter Z. Revesz A Closed Form for Datalog Queries with Integer Order , 1990, ICDT.

[7]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 1997 .

[8]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[9]  Christos Faloutsos,et al.  The R+-Tree: A Dynamic Index for Multi-Dimensional Objects , 1987, VLDB.

[10]  François Bancilhon,et al.  Naive Evaluation of Recursively Defined Relations , 1986, On Knowledge Base Management Systems.

[11]  Raghu Ramakrishnan,et al.  Magic Templates: A Spellbinding Approach To Logic Programs , 1991, J. Log. Program..

[12]  David K. Smith Theory of Linear and Integer Programming , 1987 .

[13]  Alexander Schrijver,et al.  Theory of linear and integer programming , 1986, Wiley-Interscience series in discrete mathematics and optimization.

[14]  Jan Chomicki Polynomial time query processing in temporal deductive databases , 1990, PODS '90.

[15]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[16]  Gabriel M. Kuper,et al.  Constraint query languages (preliminary report) , 1990, PODS '90.

[17]  Antonin Guttman,et al.  R-trees: a dynamic index structure for spatial searching , 1984, SIGMOD '84.

[18]  Kotagiri Ramamohanarao,et al.  A Generalization of the Differential Approach to Recursive Query Evaluation , 1987, J. Log. Program..