Skip to main content

High-Level Database Programming in Curry

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4902))

Included in the following conference series:

Abstract

This paper presents an environment to support high-level database programming in the multi-paradigm declarative programming language Curry. We define an application programming interface (API) that abstracts from the concrete database access methods. The API supports transactions and exploits Curry’s type system to ensure a strict separation between queries and updates. In order to ensure database updates that are safe w.r.t. an intended data model (e.g., containing specific relations between entities), we assume a description of the data dependencies in the entity-relationship (ER) model from which all access and update operations related to the database are generated. We propose a representation of ER diagrams in the declarative language Curry so that they can be constructed by various tools and then translated into this representation. Furthermore, we have implemented a compiler from this representation into a Curry program that provides safe access and update operations based on the API for database programming.

This work was partially supported by the German Research Council (DFG) under grant Ha 2457/5-2.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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. Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. Journal of the ACM 47(4), 776–822 (2000)

    Article  MathSciNet  Google Scholar 

  2. Chen, P.P.-S.: The Entity-Relationship Model—Toward a Unified View of Data. ACM Transactions on Database Systems 1(1), 9–36 (1976)

    Article  Google Scholar 

  3. Correas, J., Gómez, J.M., Carro, M., Cabeza, D., Hermenegildo, M.: A Generic Persistence Model for (C)LP Systems (and Two Useful Implementations). In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 104–119. Springer, Heidelberg (2004)

    Google Scholar 

  4. Das, S.K.: Deductive Databases and Logic Programming. Addison-Wesley, Reading (1992)

    MATH  Google Scholar 

  5. Fischer, S.: A Functional Logic Database Library. In: WCFLP 2005. Proc. of the ACM SIGPLAN 2005 Workshop on Curry and Functional Logic Programming, pp. 54–59. ACM Press, New York (2005)

    Chapter  Google Scholar 

  6. Gallaire, H., Minker, J. (eds.): Logic and Databases. Plenum Press, New York (1978)

    Google Scholar 

  7. Hanus, M.: A Unified Computation Model for Functional and Logic Programming. In: Proc. of the 24th ACM Symposium on Principles of Programming Languages, Paris, pp. 80–93 (1997)

    Google Scholar 

  8. Hanus, M.: A Functional Logic Programming Approach to Graphical User Interfaces. In: Pontelli, E., Santos Costa, V. (eds.) PADL 2000. LNCS, vol. 1753, pp. 47–62. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  9. Hanus, M.: High-Level Server Side Web Scripting in Curry. In: Ramakrishnan, I.V. (ed.) PADL 2001. LNCS, vol. 1990, pp. 76–92. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  10. Hanus, M.: Dynamic Predicates in Functional Logic Programs. Journal of Functional and Logic Programming 2004(5) (2004)

    Google Scholar 

  11. Hanus, M.: Type-Oriented Construction of Web User Interfaces. In: PPDP 2006. Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 27–38. ACM Press, New York (2006)

    Chapter  Google Scholar 

  12. Hanus, M.: Multi-paradigm Declarative Languages. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 45–75. Springer, Heidelberg (2007)

    Google Scholar 

  13. Hanus, M., Antoy, S., Braßel, B., Engelke, M., Höppner, K., Koj, J., Niederau, P., Sadre, R., Steiner, F.: PAKCS: The Portland Aachen Kiel Curry System (2007), http://www.informatik.uni-kiel.de/~pakcs/

  14. Hanus, M. (ed.): Curry: An Integrated Functional Logic Language (Vers. 0.8.2) (2006), http://www.informatik.uni-kiel.de/~curry

  15. Huseby, S.H.: Innocent Code: A Security Wake-Up Call for Web Programmers. Wiley, Chichester (2003)

    Google Scholar 

  16. López-Fraguas, F., Sánchez-Hernández, J.: TOY: A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)

    Google Scholar 

  17. Peyton Jones, S. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  18. Wadler, P.: How to Declare an Imperative. ACM Computing Surveys 29(3), 240–263 (1997)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Paul Hudak David S. Warren

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Braßel, B., Hanus, M., Müller, M. (2007). High-Level Database Programming in Curry. In: Hudak, P., Warren, D.S. (eds) Practical Aspects of Declarative Languages. PADL 2008. Lecture Notes in Computer Science, vol 4902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77442-6_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-77442-6_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-77441-9

  • Online ISBN: 978-3-540-77442-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics