Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2429376.2429379acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Algebraic data types for language-integrated queries

Published: 22 January 2013 Publication History

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.

References

[1]
Database Supported Haskell. http://hackage.haskell.org/package/DSH.
[2]
Roland Backhouse, Patrik Jansson, Johan Jeuring, and Lambert Meertens. Generic Programming - An Introduction. In Advanced Functional Programming. Springer, 1999.
[3]
Guy Blelloch and Gary Sabot. Compiling Collection-Oriented Languages onto Massively Parallel Computers. J. Parallel Distrib. Comput., 8(2), 1990.
[4]
Manuel Chakravarty and Gabriele Keller. More Types for Nested Data-Parallel Programming. In Proc. ICFP. ACM, 2000.
[5]
William Cook and Ali Ibrahim. Integrating Programming Languages and Databases: What is the Problem? In ODBMS.ORG, Expert Article, 2005.
[6]
Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web Programming Without Tiers. In Proc. FMCO. Springer, 2007.
[7]
George Copeland and David Maier. Making Smalltalk a Database System. In Proc. SIGMOD. ACM, 1984.
[8]
George Giorgidze, Torsten Grust, Tom Schreiber, and Jeroen Weijers. Haskell Boards the Ferry: Database-Supported Program Execution for Haskell. In Proc. IFL. Springer, 2010.
[9]
George Giorgidze, Torsten Grust, Nils Schweinsberg, and JeroenmboxWeijers. Bringing Back Monad Comprehensions. In Proc. Haskell Symposium. ACM, 2011.
[10]
Torsten Grust and Manuel Mayr. A Deep Embedding of Queries into Ruby. In Proc. ICDE. IEEE, 2012.
[11]
Torsten Grust, Manuel Mayr, Jan Rittinger, and Tom Schreiber. Ferry: Database-Supported Program Execution. In Proc. SIGMOD. ACM, 2009.
[12]
Torsten Grust, Jan Rittinger, and Tom Schreiber. Avalanche-Safe LINQ Compilation. PVLDB, 3(1), 2010.
[13]
José Pedro Magalhaes, Atze Dijkstra, Johan Jeuring, and Andres Löh. A Generic Deriving Mechanism for Haskell. In Proc. Haskell Symposium. ACM, 2010.
[14]
Erik Meijer, Brian Beckman, and Gavin Bierman. LINQ: Reconciling Object, Relations and XML in the .NET Framework. In Proc. SIGMOD. ACM, 2006.
[15]
Tim Sheard and Simon Peyton Jones. Template Meta-Programming for Haskell. In Proc. Haskell Workshop. ACM, 2002.
[16]
Alexander Ulrich. A Ferry-Based Query Backend for the Links Programming Language. Master's thesis, University of Tübingen, 2011.
[17]
Jan Van den Bussche. Simulation of the Nested Relational Algebra by the Flat Relational Algebra, with an Application to the Complexity of Evaluating Powerset Algebra Expressions. Theor. Comput. Sci., 254(1--2), 2001.

Cited By

View all
  • (2021)Query LiftingProgramming Languages and Systems10.1007/978-3-030-72019-3_21(579-606)Online publication date: 23-Mar-2021
  • (2017)Handling Environments in a Nested Relational Algebra with Combinators and an Implementation in a Verified Query CompilerProceedings of the 2017 ACM International Conference on Management of Data10.1145/3035918.3035961(1555-1569)Online publication date: 9-May-2017
  • (2016)Language-integrated provenanceProceedings of the 18th International Symposium on Principles and Practice of Declarative Programming10.1145/2967973.2968604(214-227)Online publication date: 5-Sep-2016
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
DDFP '13: Proceedings of the 2013 workshop on Data driven functional programming
January 2013
30 pages
ISBN:9781450318716
DOI:10.1145/2429376
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 January 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. algebraic data type
  2. database
  3. programming language

Qualifiers

  • Research-article

Conference

POPL '13
Sponsor:

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 11 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2021)Query LiftingProgramming Languages and Systems10.1007/978-3-030-72019-3_21(579-606)Online publication date: 23-Mar-2021
  • (2017)Handling Environments in a Nested Relational Algebra with Combinators and an Implementation in a Verified Query CompilerProceedings of the 2017 ACM International Conference on Management of Data10.1145/3035918.3035961(1555-1569)Online publication date: 9-May-2017
  • (2016)Language-integrated provenanceProceedings of the 18th International Symposium on Principles and Practice of Declarative Programming10.1145/2967973.2968604(214-227)Online publication date: 5-Sep-2016
  • (2015)Language-integrated provenance in linksProceedings of the 7th USENIX Conference on Theory and Practice of Provenance10.5555/2814579.2814591(12-12)Online publication date: 8-Jul-2015

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media