Skip to main content

What’s in a Neighborhood? Describing Nodes in RDF Graphs Using Shapes

  • Conference paper
  • First Online:
Rules and Reasoning (RuleML+RR 2024)

Abstract

There are several situations where it is desirable to be able to extract a subgraph from an RDF graph, based on a node in the graph, and given a shape that the node conforms to. Such a subgraph can be called a neighborhood. We discuss desiderata for neighborhoods, and compare different possible definitions. We show connections with data provenance and causality. We also show how to obtain provenance polynomials for the shape constraint language SHACL from the work of Dannert and Grädel.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    They actually define explanations for non-satisfaction, but we present the same idea for satisfaction, so as to fit our story better. For logics closed under negation, as indeed SHACL is, this makes no difference.

  2. 2.

    The boolean semiring has two elements 0 and 1 with logical or as addition and logical and as multiplication. Note that, since \(1+1=1\), any polynomial p is equal to \(p+p\), also \(p+p+p\), etc.

  3. 3.

    When using 3-valued neighborhoods, we should be careful about what we mean by satisfaction [6].

References

  1. Abiteboul, S., Manolescu, I., Rigaux, P., Rousset, M.C., Senellart, P.: Web Data Management. Cambridge University Press, Cambridge (2012)

    Google Scholar 

  2. Ahmetaj, S., David, R., Ortiz, M., Polleres, A., Shehu, B., Simkus, M.: Reasoning about explanations for non-validation in SHACL. In: Bienvenu, M., Lakemeyer, G., et al. (eds.) Proceedings 18th International Conference on Principles of Knowledge Representation and Reasoning, pp. 12–21. IJCAI Organization (2021)

    Google Scholar 

  3. Allemang, D., Hendler, J., Gandon, F.: Semantic Web for the Working Ontologist: Effective Modeling for Linked Data, RDFS, and OWL. ACM (2020)

    Google Scholar 

  4. Bertossi, L.: Database Repairing and Consistent Query Answering. Synthesis Lectures on Data Management, Springer, Cham (2011)

    Google Scholar 

  5. Bogaerts, B., Jakubowski, M., Van den Bussche, J.: SHACL: a description logic in disguise. In: Gottlob, G., Inclezan, D., Maratea, M. (eds.) LPNMR 2022. LNCS, vol. 13416, pp. 75–88. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-15707-3_7

    Chapter  Google Scholar 

  6. Bogaerts, B., Jakubowski, M., Van den Bussche, J.: Postulates for provenance: instance-based provenance for first-order logic. Proc. ACM Manage. Data 2(2), 95:1–95:16 (2024)

    Google Scholar 

  7. Boneva, I., Labra Gayo, J.E., Prud’hommeaux, E.G.: Semantics and validation of shapes schemas for RDF. In: d’Amato, C., et al. (eds.) ISWC 2017. LNCS, vol. 10587, pp. 104–120. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68288-4_7

    Chapter  Google Scholar 

  8. Buil-Aranda, C., Ugarte, M., et al.: A preliminary investigation into SPARQL query complexity and federation in Bio2RDF. In: Calì, A., Vidal, M.E. (eds.) Proceedings 9th Alberto Mendelzon International Workshop on Foundations of Data Management. CEUR Workshop Proceedings, vol. 1378 (2015)

    Google Scholar 

  9. Cheney, J., Chiticariu, L., Tan, W.C.: Provenance in databases: why, how and where. Foundations and Trends in Databases 1(4), 379–474 (2009)

    Article  Google Scholar 

  10. Corman, J., Reutter, J., Savkovic, O.: Semantics and validation of recursive SHACL. In: Vrandecic, D., et al. (eds.) Proceedings 17th International Semantic Web Conference. Lecture Notes in Computer Science, vol. 11136, pp. 318–336. Springer (2018). extended version, technical report KRDB18-01. https://www.inf.unibz.it/krdb/tech-reports/

  11. Cyganiak, R., Wood, D., Lanthaler, M.: RDF 1.1 concepts and abstract syntax. W3C Recommendation (2014)

    Google Scholar 

  12. Dannert, K.M., Grädel, E.: Provenance analysis: a perspective for description logics? In: Lutz, C., Sattler, U., Tinelli, C., Turhan, A.-Y., Wolter, F. (eds.) Description Logic, Theory Combination, and All That. LNCS, vol. 11560, pp. 266–285. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-22102-7_12

    Chapter  Google Scholar 

  13. Dannert, K.M., Grädel, E.: Semiring provenance for guarded logics. In: Madarász, J., Székely, G. (eds.) Hajnal Andréka and István Németi on Unity of Science. OCL, vol. 19, pp. 53–79. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-64187-0_3

    Chapter  Google Scholar 

  14. Delva, T., Dimou, A., Jakubowski, M., Van den Bussche, J.: Data provenance for SHACL. In: Stoyanovich, J., Teubner, J., et al. (eds.) Proceedings 26th International Conference on Extending Database Technology, pp. 285–297. OpenProceedings.org (2023)

    Google Scholar 

  15. Glavic, B.: Data provenance: origins, applications, algorithms, and models. Found. Trends Databases 9(3–4), 209–441 (2021)

    Article  Google Scholar 

  16. Grädel, E., Tannen, V.: Semiring provenance for first-order model checking. arXiv:1712.01980 (2017)

  17. Green, T., Karvounarakis, G., Tannen, V.: Provenance semirings. In: Proceedings 26th ACM Symposium on Principles of Database Systems, pp. 31–40. ACM (2007)

    Google Scholar 

  18. Halpern, J.: A modification of the Halpern-Pearl definition of causality. In: Yang, Q., Wooldridge, M. (eds.) Proceedings 24th International Joint Conference on Artificial Intelligence, pp. 3022–3033. AAAI Press (2015)

    Google Scholar 

  19. Halpern, J., Pearl, J.: Causes and explanations: a structural-model approach. part i: causes. Br. J. Philos. Sci. 56, 843–887 (2005)

    Article  Google Scholar 

  20. Iglesias Préstamo, A., Labra Gayo, J.: Using pregel to create knowledge graphs subsets described by non-recursive shape expressions. In: Ortiz-Rodríguez, F., Villazón-Terrazas, B., et al. (eds.) KGSWC 2023. LNCS, vol. 14382, pp. 120–134. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-47745-4_10

    Chapter  Google Scholar 

  21. Knublauch, H., Kontokostas, D.: Shapes constraint language (SHACL). W3C Recommendation (2017)

    Google Scholar 

  22. Labra Gayo, J.: Creating knowledge graph subsets using shape expressions. arXiv:2110.11709 (Oct 2021)

  23. Labra Gayo, J., Prud’hommeaux, E., Boneva, I., Kontokostas, D.: Validating RDF Data. Semantics, and Knowledge. Synthesis Lectures on Data. Springer, Cham (2018)

    Google Scholar 

  24. Ortiz, M.: A short introduction to SHACL for logicians. In: Hansen, H., Scedrov, A., et al. (eds.) WoLLIC 2023. LNCS, vol. 13923, pp. 19–32. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-39784-4_2

    Chapter  Google Scholar 

  25. Schreiber, G., Raimond, Y.: RDF 1.1 primer. W3C Working Group Note (2014)

    Google Scholar 

  26. ShEx—shape expressions. https://shex.io

  27. SPARQL 1.2 community group: DESCRIBE using shapes. https://github.com/w3c/sparql-12/issues/39

  28. Tannen, V.: Provenance analysis for FOL model checking. ACM SIGLOG News 4(1), 24–36 (2017)

    Article  Google Scholar 

  29. Verborgh, R., Vander Sande, M., Hartig, O., et al.: Triple pattern fragments: a low-cost knowledge graph interface for the web. J. Web Semant. 37–38, 184–206 (2016)

    Article  Google Scholar 

Download references

Acknowledgments

We thank Bart Bogaerts, Thomas Delva, and Anastasia Dimou for fruitful collaborations on the topics discussed in this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jan Van den Bussche .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Jakubowski, M., Van den Bussche, J. (2024). What’s in a Neighborhood? Describing Nodes in RDF Graphs Using Shapes. In: Kirrane, S., Šimkus, M., Soylu, A., Roman, D. (eds) Rules and Reasoning. RuleML+RR 2024. Lecture Notes in Computer Science, vol 15183. Springer, Cham. https://doi.org/10.1007/978-3-031-72407-7_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-72407-7_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-72406-0

  • Online ISBN: 978-3-031-72407-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics