[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1007/978-3-642-12107-4_12guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

ScalaQL: language-integrated database queries for scala

Published: 05 October 2009 Publication History

Abstract

One of the most ubiquitous elements of modern computing is the relational database. Very few modern applications are created without some sort of database backend. Unfortunately, relational database concepts are fundamentally very different from those used in general-purpose programming languages. This creates an impedance mismatch between the the application and the database layers. One solution to this problem which has been gaining traction in the .NET family of languages is Language-Integrated Queries (LINQ). That is, the embedding of database queries within application code in a way that is statically checked and type safe. Unfortunately, certain language changes or core design elements were necessary to make this embedding possible. We present a framework which implements this concept of type safe embedded queries in Scala without any modifications to the language itself. The entire framework is implemented by leveraging existing language features (particularly for-comprehensions).

References

[1]
Cook, W.R., Rai, S.: Safe Query Objects: Statically typed objects as remotely executable queries. In: Proceedings of the International Conference on Software Engineering (ICSE), pp. 97-106 (2005).
[2]
Defunkt, C.: Ruby's Ambition (2008), http://ambition.rubyforge.org/
[3]
Elliott, C., Finne, S., De Moor, O.: Compiling Embedded Languages. Journal of Functional Programming 13(03), 455-481 (2003).
[4]
Fowler, M.: Domain Specific Language (2007), http://www.martinfowler.com/bliki/DomainSpecificLanguage.html
[5]
Gil, J.Y., Lenz, K.: Simple and safe SQL queries with C++ templates. In: GPCE 2007: Proceedings of the 6th international conference on Generative programming and component engineering, pp. 13-24 (2007).
[6]
Leijen, D., Meijer, E.: Domain specific embedded compilers. In: Proceedings of the 2nd Conference on Domain-Specific Languages, pp. 109-122 (1999).
[7]
Maier, D.: Representing database programs as objects. In: Advances in database programming languages, pp. 377-386. ACM, New York (1990).
[8]
Meijer, E., Beckman, B., Bierman, G.M.: LINQ: Reconciling object, relations and XML in the .NET framework. In: Proceedings of the ACM Symposium on Principles Database Systems (2006).
[9]
Melton, J., Eisenberg, A.: Understanding SQL and Java together: a guide to SQLJ, JDBC, and related technologies. Morgan Kaufmann, San Francisco (2000).
[10]
Steele Jr., G.L.: Common LISP: the language. Digital Press (1984).
[11]
Van Wyk, E., Krishnan, L., Bodin, D., Johnson, E.: Adding domain-specific and general purpose language features to java with the java language extender. In: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, pp. 728-729 (2006).
[12]
Welsh, N., Solsona, F., Glover, I.: SchemeUnit and SchemeQL: Two little languages. In: Third Workshop on Scheme and Functional Programming (2002).
[13]
Zeiger, S.: A Type-Safe Database Query DSL for Scala (2008), http://szeiger.de/blog/2008/12/21/ a-type-safe-database-query-dsl-for-scala/

Cited By

View all
  • (2019)Scoping monadic relational database queriesProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342598(114-124)Online publication date: 8-Aug-2019
  • (2014)SYRql: A Dataflow Language for Large Scale Processing of RDF DataThe Semantic Web – ISWC 201410.1007/978-3-319-11964-9_10(147-163)Online publication date: 19-Oct-2014
  • (2013)Reify your collection queries for modularity and speed!Proceedings of the 12th annual international conference on Aspect-oriented software development10.1145/2451436.2451438(1-12)Online publication date: 24-Mar-2013
  • Show More Cited By
  1. ScalaQL: language-integrated database queries for scala

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    SLE'09: Proceedings of the Second international conference on Software Language Engineering
    October 2009
    384 pages
    ISBN:3642121063
    • Editors:
    • Mark Brand,
    • Dragan Gašević,
    • Jeff Gray

    Sponsors

    • University of Minnesota Software Engineering Center

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 05 October 2009

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

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

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Scoping monadic relational database queriesProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342598(114-124)Online publication date: 8-Aug-2019
    • (2014)SYRql: A Dataflow Language for Large Scale Processing of RDF DataThe Semantic Web – ISWC 201410.1007/978-3-319-11964-9_10(147-163)Online publication date: 19-Oct-2014
    • (2013)Reify your collection queries for modularity and speed!Proceedings of the 12th annual international conference on Aspect-oriented software development10.1145/2451436.2451438(1-12)Online publication date: 24-Mar-2013
    • (2013)A pure embedding of attribute grammarsScience of Computer Programming10.1016/j.scico.2011.11.00578:10(1752-1769)Online publication date: 1-Oct-2013
    • (2012)Type-Safe model transformation languages as internal DSLs in scalaProceedings of the 5th international conference on Theory and Practice of Model Transformations10.1007/978-3-642-30476-7_11(160-175)Online publication date: 28-May-2012
    • (2011)Development of internal domain-specific languagesProceedings of the 18th Conference on Pattern Languages of Programs10.1145/2578903.2579139(1-25)Online publication date: 21-Oct-2011
    • (2010)Using domain specific language for modeling and simulationProceedings of the Winter Simulation Conference10.5555/2433508.2433596(741-752)Online publication date: 5-Dec-2010
    • (2010)Design principles for internal domain-specific languagesProceedings of the 17th Conference on Pattern Languages of Programs10.1145/2493288.2493291(1-35)Online publication date: 16-Oct-2010

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media