Skip to main content
Log in

Preference queries in deductive databases

  • Regular Paper
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

Traditional database query languages such as datalog and SQL allow the user to specify only mandatory requirements on the data to be retrieved from a database. In many applications, it may be natural to express not only mandatory requirements but also preferences on the data to be retrieved. Lacroix and Lavency10) extended SQL with a notion of preference and showed how the resulting query language could still be translated into the domain relational calculus. We explore the use of preference in databases in the setting of datalog. We introduce the formalism of preference datalog programs (PDPs) as preference logic programs without uninterpreted function symbols for this purpose. PDPs extend datalog not only with constructs to specify which predicate is to be optimized and the criterion for optimization but also with constructs to specify which predicate to be relaxed and the criterion to be used for relaxation. We can show that all of the soft requirements in Reference10) can be directly encoded in PDP. We first develop anaively-pruned bottom-up evaluation procedure that is sound and complete for computing answers to normal and relaxation queries when the PDPs are stratified, we then show how the evaluation scheme can be extended to the case when the programs are not necessarily stratified, and finally we develop an extension of themagic templates method for datalog14) that constructs an equivalent but more efficient program for bottom-up evaluation.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Brown, A., Mantha, S. and Wakayama, T., “Preference Logics: Towards a Unified Approach to Non-Monotonicity in Deductive Reasoning,”Annals of Mathematics and Artificial Intelligence, 10, pp. 233–280, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  2. Ganguly, S., Greco, S. and Zaniolo, C., “Minimum and Maximum Predicates in Logic Programming,” inProc. of 10th ACM Symp. on Principles of Database Systems, pp. 154–163, 1991.

  3. Gelfond M. and Lifschitz, V., “The Stable Model Semantics for Logic Programming,” inProc. of 5th Joint International Conference and Symposium on Logic Programming (Kowalski, R. A. and Bowen, K. A., eds.), pp. 1081–1086, 1988.

  4. Govindarajan, K., “Optimization and Relaxation in Logic Languages,”PhD thesis, Dept. of Computer Science, SUNY-Buffalo, 1997.

  5. Govindarajan, K., Jayaraman, B. and Mantha, S., “Preference Logic Programming,” inProc. of 12th Intl. Conf. on Logic Programming, pp. 731–745. MIT Press, 1995.

  6. Govindarajan, K., Jayaraman, B. and Mantha, S., “Optimization and Relaxation in Constraint Logic Languages,” inProc. of 23rd ACM Symposium on Principles of Programming Languages, pp. 91–103, 1996.

  7. Jaffar, J. and Lassez, J. L., “Constraint Logic Programming,” inProc. of 14th ACM Symp. on Principles of Programming Languages, pp. 111–119, 1987.

  8. Kannelakis, P. C., Kuper, G. M. and Revesz, P. Z., “Constraint Query Languages,” inProc. of ACM Symp. on Principles of Database Systems, pp. 299–313, 1990.

  9. Kemp, D. B. and Stuckey, P. J., “Semantics of Logic Programs with Aggregates,” inProc. of International Logic Programming Symposium, 1991.

  10. Lacroix, M. and Lavency, P., “Preferences: Putting More Knowledge into Queries,” inProc. of 13th Intl. Conf. on Very Large Data Bases, pp. 217–225, 1987.

  11. Mantha, S., “First-Order Preference Theories and their Applications,”PhD thesis, University of Utah, November, 1991.

  12. Marek, V. W., Schwarz, G. F. and Truszczynski, M., “Modal Nonmonotonic Logics: Ranges, Characterization, Computation,”JACM, 40, 4, pp. 963–990, September 1993.

    Article  MATH  MathSciNet  Google Scholar 

  13. Ramakrishnan, R., “Magic Templates: A Spellbinding Approach to Logic Programs,” inProc. of 5th Joint Intl. Conf. and Symp. on Logic Programming, pp. 140–159, 1988.

  14. Ramakrishnan, R., Srivastava, D. and Sudarshan, S., “Efficient Bottom-up Evaluation of Logic Programs,” inthe State of the Art in Computer Systems and Software Engineering (Vandewalle, J., ed.), Kluwer Academic Publishers, 1992.

  15. Ross, K. A. and Sagiv, Y., “Monotonic Aggregation in Deductive Databases,” inProc. of ACM Symp. on Principles of Database Systems, pp. 114–126, 1992.

  16. Ross, K. A., “Modular Stratification and Magic Sets for Datalog Programs with Negation,”Journal of the ACM, 41, 6, pp. 1216–1266, 1994.

    Article  MATH  Google Scholar 

  17. Srivastava, D. and Ramakrishnan, R., “Pushing Constraint Selections,”Journal of Logic Programming, 16, 3–4, pp. 361–414, 1993. A Preliminary Version Appeared in the Proc. ACM Symp. on Principles of Database Systems 1992.

  18. Sudarshan, S. and Ramakrishnan, R., “Aggregation and Relevance in Deductive Databases,” inProc. of the International Conference on Very Large Databases, 1991.

  19. Sudarshan, S., Srivastava, D., Ramakrishnan, R. and Beeri, C., “Extending the Well-Founded and Valid Semantics for Aggregation,” inProc. of International Logic Programming Symposium, pp. 590–608, 1993.

  20. Ullman, J. D., “Bottom-up Beats Top-down for Datalog,” inProc. of ACM Symp. on Principles of Database Systems, 1989.

  21. van Gelder, A., “The Well-founded Semantics of Aggregation,” inProc. of 11th ACM Symposium on Principles of Database Systems, pp. 127–138, 1992.

  22. van Gelder, A., Ross, K. and Schlipf, J. S., “Unfounded Sets and Well-Founded Semantics for General Logic Programs,”JACM, 38, 3, pp. 620–650, 1991.

    MATH  Google Scholar 

  23. Wilson, M. and Borning, A., “Hierarchical Constraint Logic Programming,”Journal of Logic Programming, 16, pp. 277–318, 1993.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kannan Govindarajan.

Additional information

Kannan Govindarajan, Ph.D.: He obtained his bachelors degree in Computer Science and Engineering from the Indian Institute of Technology, Madras, and he completed his Ph.D. degree in Computer Science from the State University of New York at Buffalo. His dissertation research was on optimization and relaxation techniques for logic languages. His interests lie in the areas of programming languages, databases, and distributed systems. He currently leads the trading community effort in the E-speak Operation in Hewlett Packard Company. Prior to that, he was a member of the Java Products Group in Oracle Corporation.

Bharat Jayaraman, Ph.D.: He is a Professor in the Department of Computer Science at the State University of New York at Buffalo. He obtained his bachelors degree in Electronics from the Indian Institute of Technology, Madras (1975), and his Ph.D. from the University of Utah (1981). His research interests are in programming languages and declarative modeling of complex systems. Dr. Jayaraman has published over 50 papers in refereed conferences and journals. He has served on the program committees of several conferences in the area of programming languages, and he is presently on the Editorial Board of the Journal of Functional and Logic Programming.

Surya Mantha, Ph.D.: He is a manager in the Communications and Software Services Group of Pittiglio Rabin Todd & McGrath (PRTM), a management consulting firm serving high technology industries. He obtained a bachelors degree in Computer Science and Engineering from the Indian Institute of Technology, Kanpur, an MBA in Finance and Competitive Strategy from the University of Rochester, and a Ph.D. in Computer Science from the University of Utah (1991). His research interests are in the modeling of complex business processes, inter-enterprise application integration, and business strategy. Dr. Mantha has two US patents, and has published over 10 research papers. Prior to joining PRTM, he was a researcher and manager in the Architecture and Document Services Technology Center at Xerox Corporation in Rochester, New York.

About this article

Cite this article

Govindarajan, K., Jayaraman, B. & Mantha, S. Preference queries in deductive databases. New Gener Comput 19, 57–86 (2001). https://doi.org/10.1007/BF03037534

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037534

Keywords

Navigation