Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Containment of Graph Queries Modulo Schema

Published: 14 May 2024 Publication History

Abstract

With multiple graph database systems on the market and a new Graph Query Language standard on the horizon, it is time to revisit some classic static analysis problems. Query containment, arguably the workhorse of static analysis, has already received a lot of attention in the context of graph databases, but not so in the presence of schemas. We aim to change this. Because there is no universal agreement yet on what graph schemas should be, we rely on an abstract formalism borrowed from the knowledge representation community: we assume that schemas are expressed in a description logic (DL). We identify a suitable DL that capture both basic constraints on the labels of incident nodes and edges, and more refined schema features such as participation, cardinality, and unary key constraints. Basing upon, and extending, the rich body of work on DLs, we solve the containment modulo schema problem for unions of conjunctive regular path queries (UCRPQs) and schemas whose descriptions do not mix inverses and counting. For two-way UCRPQs (UC2RPQs) we solve the problem under additional assumptions that tend to hold in practice: we restrict the use of concatenation in queries and participation constraints in schemas.

References

[1]
Renzo Angles, Marcelo Arenas, Pablo Barceló, Aidan Hogan, Juan L. Reutter, and Domagoj Vrgoc. 2017. Foundations of Modern Query Languages for Graph Databases. ACM Comput. Surv., Vol. 50, 5 (2017), 68:1--68:40.
[2]
Renzo Angles, Angela Bonifati, Stefania Dumbrava, George Fletcher, Alastair Green, Jan Hidders, Bei Li, Leonid Libkin, Victor Marsault, Wim Martens, Filip Murlak, Stefan Plantikow, Ognjen Savkovic, Michael Schmidt, Juan Sequeda, Slawek Staworko, Dominik Tomaszuk, Hannes Voigt, Domagoj Vrgoc, Mingxi Wu, and Dusan Zivkovic. 2022. PG-Schema: Schemas for Property Graphs. CoRR, Vol. abs/2211.10962 (2022).
[3]
Renzo Angles, Angela Bonifati, Stefania Dumbrava, George Fletcher, Keith W. Hare, Jan Hidders, Victor E. Lee, Bei Li, Leonid Libkin, Wim Martens, Filip Murlak, Josh Perryman, Ognjen Savkovic, Michael Schmidt, Juan F. Sequeda, Slawek Staworko, and Dominik Tomaszuk. 2021. PG-Keys: Keys for Property Graphs. In SIGMOD Conference. ACM, 2423--2436.
[4]
Alessandro Artale, Diego Calvanese, Roman Kontchakov, and Michael Zakharyaschev. 2009. The DL-Lite Family and Relations. J. Artif. Intell. Res., Vol. 36 (2009), 1--69.
[5]
Franz Baader, Ian Horrocks, Carsten Lutz, and Ulrike Sattler. 2017. An Introduction to Description Logic. Cambridge University Press.
[6]
Pablo Barceló Baeza. 2013. Querying graph databases. In PODS. ACM, 175--188.
[7]
Daniela Berardi, Diego Calvanese, and Giuseppe De Giacomo. 2005. Reasoning on UML class diagrams. Artif. Intell., Vol. 168, 1--2 (2005), 70--118.
[8]
Iovka Boneva, Beno^it Groz, Jan Hidders, Filip Murlak, and Slawek Staworko. 2023. Static Analysis of Graph Database Transformations. In Proceedings of the 42nd ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems (Seattle, WA, USA) (PODS '23). Association for Computing Machinery, New York, NY, USA, 251--261. https://doi.org/10.1145/3584372.3588654
[9]
Angela Bonifati, Wim Martens, and Thomas Timm. 2019. Navigating the Maze of Wikidata Query Logs. In WWW. ACM, 127--138.
[10]
Angela Bonifati, Wim Martens, and Thomas Timm. 2020. An analytical study of large SPARQL query logs. VLDB J., Vol. 29, 2--3 (2020), 655--679.
[11]
Pierre Bourhis and Carsten Lutz. 2016. Containment in Monadic Disjunctive Datalog, MMSNP, and Expressive Description Logics. In KR. AAAI Press, 207--216.
[12]
Diego Calvanese, Giuseppe De Giacomo, and Maurizio Lenzerini. 1998 a. On the Decidability of Query Containment under Constraints. In PODS. ACM Press, 149--158.
[13]
Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Moshe Y. Vardi. 2000. Containment of Conjunctive Regular Path Queries with Inverse. In KR. Morgan Kaufmann, 176--185.
[14]
Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Moshe Y. Vardi. 2002. Rewriting of Regular Expressions and Regular Path Queries. J. Comput. Syst. Sci., Vol. 64, 3 (2002), 443--465.
[15]
Diego Calvanese, Maurizio Lenzerini, and Daniele Nardi. 1998 b. Description Logics for Conceptual Data Modeling. In Logics for Databases and Information Systems. Kluwer, 229--263.
[16]
Diego Calvanese, Maurizio Lenzerini, and Daniele Nardi. 1999. Unifying Class-Based Representation Formalisms. J. Artif. Intell. Res., Vol. 11 (1999), 199--240.
[17]
Diego Calvanese, Magdalena Ortiz, and Mantas Simkus. 2011. Containment of Regular Path Queries under Description Logic Constraints. In IJCAI. IJCAI/AAAI, 805--812.
[18]
Daniel Danielski and Emanuel Kieronski. 2019. Finite Satisfiability of Unary Negation Fragment with Transitivity. In MFCS (LIPIcs, Vol. 138). 17:1--17:15.
[19]
Alin Deutsch, Nadime Francis, Alastair Green, Keith Hare, Bei Li, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Wim Martens, Jan Michels, Filip Murlak, Stefan Plantikow, Petra Selmer, Oskar van Rest, Hannes Voigt, Domagoj Vrgoc, Mingxi Wu, and Fred Zemke. 2022. Graph Pattern Matching in GQL and SQL/PGQ. In SIGMOD Conference. ACM, 2246--2258.
[20]
Alin Deutsch and Val Tannen. 2001. Optimization Properties for Classes of Conjunctive Regular Path Queries. In DBPL (Lecture Notes in Computer Science, Vol. 2397). Springer, 21--39.
[21]
Diego Figueira. 2020. Containment of UC2RPQ: The Hard and Easy Cases. In ICDT (LIPIcs, Vol. 155). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 9:1--9:18.
[22]
Diego Figueira, Adwait Godbole, Shankara Narayanan Krishna, Wim Martens, Matthias Niewerth, and Tina Trautner. 2020. Containment of Simple Conjunctive Regular Path Queries. In KR. 371--380.
[23]
Daniela Florescu, Alon Y. Levy, and Dan Suciu. 1998. Query Containment for Conjunctive Queries with Regular Expressions. In PODS. ACM Press, 139--148.
[24]
Nadime Francis, Amé lie Gheerbrant, Paolo Guagliardo, Leonid Libkin, Victor Marsault, Wim Martens, Filip Murlak, Liat Peterfreund, Alexandra Rogova, and Domagoj Vrgoc. 2023. A Researcher's Digest of GQL (Invited Talk). In ICDT (LIPIcs, Vol. 255). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 1:1--1:22.
[25]
Jakub Galgonek, Tomáv s Hurt, Vendula Michl'iková, Petr Onderka, Jan Schwarz, and Jiv r'i Vondráv sek. 2016. Advanced SPARQL querying in small molecule databases. Journal of Cheminformatics, Vol. 8, 1 (2016), 31. https://doi.org/10.1186/s13321-016-0144--4
[26]
Abraham Ginzburg. 1968. Algebraic Theory of Automata. Academic Press.
[27]
Tomasz Gogacz, V'i ctor Gutié rrez-Basulto, Albert Gutowski, Yazm'i n Ibá n ez-Garc'i a, and Filip Murlak. 2020. On Finite Entailment of Non-Local Queries in Description Logics. In KR. 424--433.
[28]
V'i ctor Gutié rrez-Basulto, Albert Gutowski, Yazm'i n Ibá n ez-Garc'i a, and Filip Murlak. 2022. Finite Entailment of UCRPQs over ALC Ontologies. In Proceedings of the 19th International Conference on Principles of Knowledge Representation and Reasoning, KR 2022, Haifa, Israel. July 31 - August 5, 2022, Gabriele Kern-Isberner, Gerhard Lakemeyer, and Thomas Meyer (Eds.). https://proceedings.kr.org/2022/19/
[29]
V'i ctor Gutié rrez-Basulto, Yazm'i n Ibá n ez-Garc'i a, Jean Christoph Jung, and Filip Murlak. 2023. Answering regular path queries mediated by unrestricted SQ ontologies. Artif. Intell., Vol. 314 (2023), 103808.
[30]
David Harel, Jerzy Tiuryn, and Dexter Kozen. 2000. Dynamic Logic. MIT Press, Cambridge, MA, USA.
[31]
Audrey Lee and Ileana Streinu. 2008. Pebble game algorithms and sparse graphs. Discret. Math., Vol. 308, 8 (2008), 1425--1437. https://doi.org/10.1016/j.disc.2007.07.104
[32]
Artem Lysenko, Irina A. Roznovua ct, Mansoor Saqi, Alexander Mazein, Christopher J. Rawlings, and Charles Auffray. 2016. Representing and querying disease networks using graph databases. BioData Mining, Vol. 9, 1 (2016), 23.
[33]
Martin Otto. 2010. Highly Acyclic Groups, Hypergraph Covers and the Guarded Fragment. In LICS. IEEE Computer Society, 11--20.
[34]
Vaughan R. Pratt. 1979. Models of Program Logics. In FOCS. IEEE Computer Society, 115--122.
[35]
Sherif Sakr, Angela Bonifati, Hannes Voigt, Alexandru Iosup, Khaled Ammar, Renzo Angles, Walid G. Aref, Marcelo Arenas, Maciej Besta, Peter A. Boncz, Khuzaima Daudjee, Emanuele Della Valle, Stefania Dumbrava, Olaf Hartig, Bernhard Haslhofer, Tim Hegeman, Jan Hidders, Katja Hose, Adriana Iamnitchi, Vasiliki Kalavri, Hugo Kapp, Wim Martens, M. Tamer Ö zsu, Eric Peukert, Stefan Plantikow, Mohamed Ragab, Matei Ripeanu, Semih Salihoglu, Christian Schulz, Petra Selmer, Juan F. Sequeda, Joshua Shinavier, Gá bor Szá rnyas, Riccardo Tommasini, Antonino Tumeo, Alexandru Uta, Ana Lucia Varbanescu, Hsiang-Yun Wu, Nikolay Yakovets, Da Yan, and Eiko Yoneki. 2021. The future is big graphs: a community view on graph processing systems. Commun. ACM, Vol. 64, 9 (2021), 62--71.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Management of Data
Proceedings of the ACM on Management of Data  Volume 2, Issue 2
PODS
May 2024
852 pages
EISSN:2836-6573
DOI:10.1145/3665155
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 May 2024
Published in PACMMOD Volume 2, Issue 2

Author Tags

  1. conjunctive regular path queries
  2. containment
  3. description logics
  4. entailment
  5. finite model reasoning
  6. schema
  7. two-way

Qualifiers

  • Research-article

Funding Sources

  • NCN

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 136
    Total Downloads
  • Downloads (Last 12 months)136
  • Downloads (Last 6 weeks)32
Reflects downloads up to 03 Oct 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media