Between types and tables: using generic programming for automated mapping between data types and relational databases

  • Authors:
  • Bas Lijnse;Rinus Plasmeijer

  • Affiliations:
  • Radboud University Nijmegen;Radboud University Nijmegen

  • Venue:
  • IFL'08 Proceedings of the 20th international conference on Implementation and application of functional languages
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

In today's digital society, information systems play an important role in many organizations. While their construction is a well understood software engineering process, it still requires much engineering effort. The de facto storage mechanism in information systems is the relational database. Although the representation of data in these databases is optimized for efficient storage, it is less suitable for use in the software components that manipulate the data. Therefore, much of the construction of an information system consists of programming translations between the database and a more convenient representation in the software. In this paper we present an approach which automates this work for data entry applications, by providing generic versions of the elementary CRUD (Create, Read, Update, Delete) operations. In the spirit of model based development we use Object Role Models, which are normally used to design databases, to derive not only a database, but also a set of data types in Clean to hold data during manipulation. These types represent all information related to a conceptual entity as a single value, and contain enough information about the database to enable automatic mapping. For data entry applications this means that all database operations can be handled by a single generic function. To illustrate the viability of our approach, a prototype library, which performs this mapping, and an example information system have been implemented.