Algebraic data types for language-integrated queries

  • Authors:
  • George Giorgidze;Torsten Grust;Alexander Ulrich;Jeroen Weijers

  • Affiliations:
  • University of Tübingen, Tübingen, Germany;University of Tübingen, Tübingen, Germany;University of Tübingen, Tübingen, Germany;University of Tübingen, Tübingen, Germany

  • Venue:
  • DDFP '13 Proceedings of the 2013 workshop on Data driven functional programming
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

The seamless integration of relational databases and programming languages remains a major challenge. Mapping rich data types featured in general-purpose programming languages to the relational data model is one aspect of this challenge. We present a novel technique for mapping arbitrary (nonrecursive) algebraic data types to a relational data model, based on previous work on the relational representation of nested tables. Algebraic data types may be freely constructed and deconstructed in queries and may show up in the result type. The number of relational queries generated is small and statically determined by the type of the query. We have implemented the mapping in the Database Supported Haskell (DSH) library.