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

On the semantics of Cypher's implicit group-by

Published: 23 June 2019 Publication History

Abstract

Cypher is a popular declarative query language for property graphs. Despite having been adopted by several graph database vendors, it lacks a comprehensive semantics other than the reference implementation. This paper stems from Cypher.PL, a project aimed at creating an executable (and readable) semantics of Cypher in Prolog, and focuses on Cypher's implicit group-by feature. Rather than being explicitly specified in the query, in Cypher the grouping key is derived from the return expressions. We show how this becomes problematic when a single return expression mixes unaggregated property references and aggregating functions, and discuss ways of giving this construct a proper semantics without defying common sense.

References

[1]
Renzo Angles, Marcelo Arenas, Pablo Barceló, Peter A. Boncz, George H. L. Fletcher, Claudio Gutierrez, Tobias Lindaaker, Marcus Paradies, Stefan Plantikow, Juan F. Sequeda, Oskar van Rest, and Hannes Voigt. 2018. G-CORE: A Core for Future Graph Query Languages. In Proc. SIGMOD 2018. 1421-1432.
[2]
John Canny. 1988. Some Algebraic and Geometric Computations in PSPACE. In Proc. STOC 1988. ACM, New York, NY, USA, 460-467.
[3]
B. F. Caviness. 1970. On Canonical Forms and Simplification. J. ACM 17 (1970), 385-396.
[4]
Nadime Francis, Alastair Green, Paolo Guagliardo, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Stefan Plantikow, Mats Rydberg, Martin Schuster, Petra Selmer, and Andrés Taylor. 2018. Formal Semantics of the Language Cypher. CoRR abs/1802.09984 (2018). arXiv:1802.09984 http://arxiv.org/abs/1802.09984
[5]
Nadime Francis, Alastair Green, Paolo Guagliardo, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Stefan Plantikow, Mats Rydberg, Petra Selmer, and Andrés Taylor. 2018. Cypher: An Evolving Query Language for Property Graphs. In Proc. SIGMOD 2018. 1433-1445.
[6]
Markus P Fromherz. 1993. A Methodology for Executable Specifications: Combining Logic Programming, Object-orientation and Visualization. Ph.D. Dissertation. Department of Computer Science, University of Zurich.
[7]
Norbert E. Fuchs. 1992. Specifications Are (Preferably) Executable. Softw. Eng. J. 7, 5 (Sept. 1992), 323-334.
[8]
Gopal Gupta and Enrico Pontelli. 2002. Specification, Implementation, and Verification of Domain Specific Languages: A Logic Programming-Based Approach. In Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, Part I. 211-239.
[9]
Neo4j Inc. 2018. The GQL Manifesto. https://gql.today/
[10]
ISO/IEC 9075:2016 2016. Information technology - Database languages - SQL (ISO/IEC 9075:2016). Standard. International Organization for Standardization, Geneva, Switzerland.
[11]
R. Kowalski. 1985. The Relation Between Logic Programming and Logic Specification. In Proc. of a Discussion Meeting of the Royal Society of London on Mathematical Logic and Programming Languages. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 11-27. http://dl.acm.org/citation.cfm?id=3721.3722
[12]
M. Laczkovich. 2003. The Removal of p from Some Undecidable Problems Involving Elementary Functions. Proc. Amer. Math. Soc. 131, 7 (2003), 2235-2240. http://www.jstor.org/stable/1194043
[13]
Angus Macintyre and Alex J Wilkie. 1996. On the decidability of the real exponential field. In Kreiseliana: About and around Georg Kreisel, Piergeorgio Odifreddi (Ed.). A.K. Peters, 441-467.
[14]
Yu. Matiyasevich. 1970. The Diophantineness of enumerable sets (Russian). Dokl. Akad. Nauk SSSR 191 (10 1970), 279-282.
[15]
openCypher. 2017. The Summer of Syntax: Aggregation and grouping. http://www.opencypher.org/blog/2017/07/27/ocig1-aggregations-blog Accessed: 2018-09-24.
[16]
openCypher. 2018. Cypher Query Language Reference, Version 9. Technical Report. https://s3.amazonaws.com/artifacts.opencypher.org/openCypher9.pdf
[17]
openCypher. 2018. openCypher. http://www.opencypher.org/
[18]
openCypher. 2018. The Cypher Technology Compatibility Kit. https://github.com/opencypher/openCypher/tree/master/tck
[19]
Daniel Richardson. 1968. Some Undecidable Problems Involving Elementary Functions of a Real Variable. J. Symbolic Logic 33, 4 (12 1968), 514-520. https://projecteuclid.org:443/euclid.jsl/1183736504
[20]
Ian Robinson, Jim Webber, and Emil Eifrem. 2013. Graph Databases. O'Reilly Media, Inc.
[21]
Julia Robinson. 1949. Definability and decision problems in arithmetic. J. Symb. Log. 14 (1949), 98-114.
[22]
Alfred Tarski. 1948. A Decision Method for Elementary Algebra and Geometry. RAND Corporation, Santa Monica, CA, USA. iii+60 pages.

Index Terms

  1. On the semantics of Cypher's implicit group-by

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    DBPL 2019: Proceedings of the 17th ACM SIGPLAN International Symposium on Database Programming Languages
    June 2019
    84 pages
    ISBN:9781450367189
    DOI:10.1145/3315507
    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

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 23 June 2019

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Cypher query language
    2. implicit group-by

    Qualifiers

    • Research-article

    Conference

    PLDI '19
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 10 of 15 submissions, 67%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 82
      Total Downloads
    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 30 Aug 2024

    Other Metrics

    Citations

    View Options

    Get Access

    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