High-Level Database Programming in Curry

by Bernd Braßel, Michael Hanus, Marion Müller

Proc. of the 10th International Symposium on Practical Aspects of Declarative Languages (PADL'08), Springer LNCS 4902, pp. 316-332, 2008
© Springer-Verlag

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.

PDF (193 KB) BibTeX-Entry