An SQL-Based Query Language and Engine for Graph Pattern Matching

  • Christian Krause
  • Daniel Johannsen
  • Radwan Deeb
  • Kai-Uwe Sattler
  • David Knacker
  • Anton Niadzelka
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9761)

Abstract

The interest for graph databases has increased in the recent years. Several variants of graph query languages exist – from low-level programming interfaces to high-level, declarative languages. In this paper, we describe a novel SQL-based language for modeling high-level graph queries. Our approach is based on graph pattern matching concepts, specifically nested graph conditions with distance constraints, as well as graph algorithms for calculating nested projections, shortest paths and connected components. Extending SQL with graph concepts enables the reuse of syntax elements for arithmetic expressions, aggregates, sorting and limits, and the combination of graph and relational queries. We evaluate the language concepts and our experimental SAP HANA Graph Scale-Out Extension (GSE) prototype (This paper is not official SAP communication material. It discusses a research-only prototype, not an existing or future SAP product. Any business decisions made concerning SAP products should be based on official SAP communication material.) using the LDBC Social Network Benchmark. In this work we consider only complex read-only queries, but the presented language paves the way for a SQL-based graph manipulation language formally based on graph transformations.

References

  1. 1.
    Boehm, P., Fonio, H., Habel, A.: Amalgamation of graph transformations: a synchronization mechanism. J. Comput. Syst. Sci. 34(2/3), 377–408 (1987)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Brunel, R., Finis, J., Franz, G., May, N., Kemper, A., Neumann, T., Färber, F.: Supporting hierarchical data in SAP HANA. In: Proceedings of ICDE 2015, pp. 1280–1291. IEEE (2015)Google Scholar
  3. 3.
    Ehrig, H., Ehrig, K., Habel, A., Pennemann, K.-H.: Constraints and application conditions: from graphs to high-level structures. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 287–303. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  4. 4.
    Erling, O., Averbuch, A., Larriba-Pey, J., Chafi, H., Gubichev, A., Prat-Pérez, A., Pham, M., Boncz, P.A.: The LDBC social network benchmark: interactive workload. In: Proceedings of 2015 ACM SIGMOD, pp. 619–630. ACM (2015)Google Scholar
  5. 5.
    Goel, A.K., Pound, J., Auch, N., Bumbulis, P., MacLean, S., Färber, F., Gropengießer, F., Mathis, C., Bodner, T., Lehner, W.: Towards scalable real-time analytics: an architecture for scale-out of OLxP workloads. PVLDB 8(12), 1716–1727 (2015)Google Scholar
  6. 6.
    Gubichev, A., Then, M.: Graph pattern matching - do we have to reinvent the wheel? In: Proceedings of GRADES 2014, pp. 8:1–8:7. ACM (2014)Google Scholar
  7. 7.
    Habel, A., Pennemann, K.: Correctness of high-level transformation systems relative to nested conditions. Math. Struct. Comput. Sci. 19(2), 245–296 (2009)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Heckel, R., Küster, J.M., Taentzer, G.: Confluence of typed attributed graph transformation systems. In: Corradini, A., Ehrig, H., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2002. LNCS, vol. 2505, pp. 161–176. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  9. 9.
    Krause, C., Tichy, M., Giese, H.: Implementing graph transformations in the bulk synchronous parallel model. In: Gnesi, S., Rensink, A. (eds.) FASE 2014 (ETAPS). LNCS, vol. 8411, pp. 325–339. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  10. 10.
    Neo Technology Inc., OpenCypher (2015). http://www.opencypher.org
  11. 11.
    Prat, A., Boncz, P., Larriba, J.L., Angles, R., Averbuch, A., Erling, O., Gubichev, A., Spasić, M., Pham, M.D., Martínez, N.: LDBC Social Network Benchmark (SNB) - v0.2.2 first public draft (2015). http://github.com/ldbc/ldbc_snb_docs/blob/master/LDBC_SNB_v0.2.2.pdf
  12. 12.
    Rodriguez, M.A.: The Gremlin graph traversal machine and language (invited talk). In: Proceedings of DBPL 2015 (DBPL 2015), pp. 1–10. ACM (2015)Google Scholar
  13. 13.
    Rudolf, M.: Utilizing constraint satisfaction techniques for efficient graph pattern matching. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) TAGT 1998. LNCS, vol. 1764, pp. 238–252. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  14. 14.
    SAP SE: SAP HANA core data services (CDS) reference (2015). http://help.sap.com/hana/SAP_HANA_Core_Data_Services_CDS_Reference_en.pdf
  15. 15.
    SAP SE: SAP HANA spatial reference (2015). http://help.sap.com/hana/sap_hana_spatial_reference_en.pdf
  16. 16.
    Valiant, L.G.: A bridging model for parallel computation. Commun. ACM 33(8), 103–111 (1990)CrossRefGoogle Scholar
  17. 17.
    Varró, G., Friedl, K., Varró, D.: Implementing a graph transformation engine in relational databases. Softw. Syst. Model. 5(3), 313–341 (2006)CrossRefGoogle Scholar
  18. 18.
    World Wide Web Consortium (W3C): SPARQL 1.1 query language (2013). http://www.w3.org/TR/2013/REC-sparql11-query-20130321

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Christian Krause
    • 1
  • Daniel Johannsen
    • 1
  • Radwan Deeb
    • 1
  • Kai-Uwe Sattler
    • 2
  • David Knacker
    • 1
  • Anton Niadzelka
    • 1
  1. 1.SAP SEPotsdamGermany
  2. 2.Technische Universität IlmenauIlmenauGermany

Personalised recommendations