skip to main content
10.1145/3078447.3078457acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Extending SQL for Computing Shortest Paths

Authors Info & Claims
Published:19 May 2017Publication History

ABSTRACT

Reachability and shortest paths are among two of the most common queries realized on graphs. While graph frameworks and property graph databases provide an extensive and convenient built-in support for these operations, it is still both clunky and inefficient to perform on standard SQL DBMSs. In this paper, we present an extension to the standard SQL language to compute both reachability predicates and many-to-many shortest path queries. We first describe a methodology to represent a directed graph starting from virtual table expressions. Second, we introduce a new type of operator to compute shortest paths on the given graph. Our semantic abides by the rules of operating with table expressions, ensuring that the property of the closure from the relational algebra is retained. Finally, we developed a prototype implementation of our extension on top of MonetDB, an existing open source relational DBMS. Our preliminary results still show that dynamically building our representation of the underlying graph overly dominates the query time. Currently, this cost can only be amortized when executing multiple shortest paths on the same graph.

References

  1. 2017. AgensGraph. (2017). http://bitnine.net/agensgraph/Google ScholarGoogle Scholar
  2. 2017. The Gremlin Graph Traversal Machine and Language. (2017). http://tinkerpop.apache.org/gremlin.htmlGoogle ScholarGoogle Scholar
  3. 2017. Hive documentation: Lateral views. (2017). Retrieved March 2017 from https://cwiki.apache.org/confluence/display/Hive/LanguageManual+LateralViewGoogle ScholarGoogle Scholar
  4. 2017. Introduction to Apache Giraph. (2017). http://giraph.apache.org/intro.htmlGoogle ScholarGoogle Scholar
  5. 2017. LDBC-SNB Data Generator (DATAGEN. (2017). Retrieved March 2017 from https://github.com/ldbc/ldbc_snb_datagenGoogle ScholarGoogle Scholar
  6. 2017. LDBC Social Network Benchmark (SNB) specification. (2017). Retrieved March 2017 from https://github.com/ldbc/ldbc_snb_docsGoogle ScholarGoogle Scholar
  7. 2017. The openCypher project. (2017). http://www.opencypher.org/Google ScholarGoogle Scholar
  8. 2017. OpenLink Virtuoso documentation. Transitivity in SQL. (2017). http://docs.openlinksw.com/virtuoso/transitivityinsql/Google ScholarGoogle Scholar
  9. 2017. SAP Hana Graph documentation. (2017). help.sap.com/hana/SAP_HANA_Graph_Reference_en.pdfGoogle ScholarGoogle Scholar
  10. 2017. Snowflake documentation: FLATTEN table function. (2017). Retrieved March 2017 from https://docs.snowflake.net/manuals/sql-reference/functions/flatten.htmlGoogle ScholarGoogle Scholar
  11. Ravindra K. Ahuja, Kurt Mehlhorn, James Orlin, and Robert E. Tarjan. 1993. Faster algorithms for the shortest path problem. Journal of the ACM (JACM) 37, 2 (April 1993), 212--223. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C.J. Date. 2011. SQL and Relational Theory: How to Write Accurate SQL Code (2nd ed.). O'Really. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Orri Erling, Alex Averbuch, Josep Larriba-Pey, Hassan Chafi, Andrey Gubichev, Arnau Prat, Minh-Duc Pham, and Peter Boncz. 2015. The LDBC Social Network Benchmark: Interactive Workload. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data. 619--630. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Jing Fan, Adalbert Gerald Soosai Raj, and Jignesh M. Patel. 2015. The Case Against Specialized Graph Analytics Engines. In CIDR.Google ScholarGoogle Scholar
  15. ISO. 2011. ISO/IEC 9075-2:2011 Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation). International Organization for Standardization. https://www.iso.org/standard/53682.htmlGoogle ScholarGoogle Scholar
  16. MonetDB team. 2017. MonetDB. (2017). Retrieved March 2017 from https://www.monetdb.org/Google ScholarGoogle Scholar
  17. Adam Welc, Raghavan Raman, Zhe Wu, Sungpack Hong, Hassan Chafi, and Jay Banerjee. 2013. Graph Analysis: Do We Have to Reinvent the Wheel?. In First International Workshop on Graph Data Management Experiences and Systems (GRADES '13). ACM, New York, NY, USA, Article 7, 6 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  1. Extending SQL for Computing Shortest Paths

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      GRADES'17: Proceedings of the Fifth International Workshop on Graph Data-management Experiences & Systems
      May 2017
      87 pages
      ISBN:9781450350389
      DOI:10.1145/3078447

      Copyright © 2017 ACM

      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 the author(s) 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].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 May 2017

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      Overall Acceptance Rate29of61submissions,48%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader