Safe Constraint Queries
21 March 2000
We extend some of the classical characterization theorems of the relational theory--particularly those related to query safety--to the context where database elements come with fixed interpreted structure, and where formulae over elements of that structure can be used in queries. We show that the addition of common interpreted functions such as real addition and multiplication to the relational calculus preserve important characterization theorems of the relational calculus, and also preserves certain combinatorial properties of queries. Our main result of the first kind is that there is a syntactic characterization of the collection of safe queries over the relational calculus supplemented by a wide class of interpreted functions--a class that includes addition, multiplication, and exponentiation--and that this characterization gives us an interpreted analog of the concept of range-restricted query from the uninterpreted setting. Futhermore, our range-restricted queries are particularly intuitive for the relational calculus with real arithmetic, and give a natural syntax for safe queries in the presence of polynonmial fuctions.