Abstract
The by now standard perspective on databases, especially deductive databases, is that they can be specified by sets of first order sentences. As such, they can be said to be claims about the truths of some external world; the database is a representation of that world.
Virtually all approaches to database query evaluation treat queries as first order formulas, usually with free variables whose bindings resulting from the evaluation phase define the answers to the query. Following Levesque [8, 9], we argue that, for greater expressiveness, queries should be formulas in an epistemic modal logic. Queries, in other words, should be permitted to address aspects of the external world as represented by the database, as well as aspects of the database itself, i.e. aspects of what the database knows about that external world. We shall also argue that integrity constraints are best viewed as sentences about what the database knows, not, as is usually the case, as first order sentences about the external world. On this view, integrity constraints are modal sentences and hence are formally identical to a strict subset of the permissible database queries. Integrity maintenance then becomes formally identical to query evaluation for a certain class of database queries.
We formalize these notions in Levesque’s language KFOPCE, and define the concepts of an answer to a query and of a database satisfying its integrity constraints. We also show that Levesque’s axiomatization of KFOPCE provides a suitable logic for reasoning about queries and integrity constraints. Next, we show how to do query evaluation and integrity maintenance for a restricted, but sizable class of queries/constraints. An interesting feature of this class of queries/constraints is that Prolog’s negation as failure mechanism serves to reduce query evaluation to first order theorem proving. This provides independent confirmation that negation as failure is really an epistemic operator in disguise. Finally, we provide sufficient conditions for the completeness of this query evaluator.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
K. Bowen and R. Kowalski. Amalgamating language and meta-language in logic programming. In K.L. Clark and S.A. Tarnlund, editors, Logic Programming, pages 153–172. Academic Press, New York, 1982.
U.S. Chakravarthy, J. Grant, and J. Minker. Logic based approach to semantic query optimization. ACM Transactions on Database Systems, in press.
L. Chung, D. Rios-Zertuche, B. Nixon, and J. Mylopoulos. Process management and assertion enforcement for a semantic data model. Technical report, Department of Computer Science, University of Toronto, 1987.
K.L. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 292–322. Plenum Press, New York, 1978.
R. Fagin. Horn clauses and database dependencies. In ACM Symp. on Theory of Computing, pages 123–134, 1980.
R. Kowalski. Logic for data description. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 77–103. Plenum Press, New York, 1978.
R. Kowalski. Logic for Problem Solving. Elsevier Science Publishers B.V. (North-Holland), 1979.
H. L. Levesque. A Formal Treatment of Incomplete Knowledge Bases. PhD thesis, Department of Computer Science, University of Toronto, 1981.
H. L. Levesque. Foundations of a functional approach to knowledge representation. Artificial Intelligence, 23:155–212, 1984.
H. L. Levesque. All I know: A study in autoepistemic logic. Artificial Intelligence, 2:263–309, 1990.
J. W. Lloyd and R.W. Topor. A basis for deductive database systems. Journal of Logic Programming, 2:93–109, 1985.
J.W. Lloyd. Foundations of Logic Programming. Springer Verlag, second edition, 1987.
J.M. Nicolas. Logic for improving integrity checking in relational databases. Acta Information, 18(3):227–253, 1982.
J.M. Nicolas and H. Gallaire. Data base: Theory vs. interpretation. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 33–54. Plenum Press, New York, 1978.
J.M. Nicolas and K. Yazdanian. Integrity checking in deductive data bases. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 325–344. Plenum Press, New York, 1978.
R. Reiter. Towards a logical reconstruction of relational database theory. In M.L. Brodie, J. Mylopoulos, and J.W. Schmidt, editors, On Conceptual Modelling: Perspectives from Artificial Intelligence, Databases and Programming Languages, pages 191–233. Springer, New York, 1984.
R. Reiter. On integrity constraints. In M. Vardi, editor, Proceedings of the Second Conference on Theoretical Aspects of Reasoning about Knowledge, pages 97–111. Morgan Kaufmann Publishers, Inc., 1988.
R. Reiter. What should a database know? Technical report, Department of Computer Science, University of Toronto, 1990.
F. Sadri and R. Kowalski. An application of general purpose theorem-proving to database integrity. In J. Minker, editor, Foundations of Deductive Databases. Morgan Kaufmann Publishers, Inc., Palo Alto, California, 1987.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1990 ECSC — EEC — EAEC, Brussels — Luxembourg
About this paper
Cite this paper
Reiter, R. (1990). On Asking What a Database Knows. In: Lloyd, J.W. (eds) Computational Logic. ESPRIT Basic Research Series. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-76274-1_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-76274-1_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-76276-5
Online ISBN: 978-3-642-76274-1
eBook Packages: Springer Book Archive