Skip to main content

On Asking What a Database Knows

  • Conference paper
Computational Logic

Part of the book series: ESPRIT Basic Research Series ((ESPRIT BASIC))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. U.S. Chakravarthy, J. Grant, and J. Minker. Logic based approach to semantic query optimization. ACM Transactions on Database Systems, in press.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. R. Fagin. Horn clauses and database dependencies. In ACM Symp. on Theory of Computing, pages 123–134, 1980.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. R. Kowalski. Logic for Problem Solving. Elsevier Science Publishers B.V. (North-Holland), 1979.

    MATH  Google Scholar 

  8. H. L. Levesque. A Formal Treatment of Incomplete Knowledge Bases. PhD thesis, Department of Computer Science, University of Toronto, 1981.

    Google Scholar 

  9. H. L. Levesque. Foundations of a functional approach to knowledge representation. Artificial Intelligence, 23:155–212, 1984.

    Article  MATH  Google Scholar 

  10. H. L. Levesque. All I know: A study in autoepistemic logic. Artificial Intelligence, 2:263–309, 1990.

    Article  MathSciNet  Google Scholar 

  11. J. W. Lloyd and R.W. Topor. A basis for deductive database systems. Journal of Logic Programming, 2:93–109, 1985.

    Article  MathSciNet  MATH  Google Scholar 

  12. J.W. Lloyd. Foundations of Logic Programming. Springer Verlag, second edition, 1987.

    MATH  Google Scholar 

  13. J.M. Nicolas. Logic for improving integrity checking in relational databases. Acta Information, 18(3):227–253, 1982.

    MathSciNet  MATH  Google Scholar 

  14. 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.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. R. Reiter. What should a database know? Technical report, Department of Computer Science, University of Toronto, 1990.

    Google Scholar 

  19. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics