Skip to main content
Log in

A model and query language for temporal graph databases

  • Regular Paper
  • Published:
The VLDB Journal Aims and scope Submit manuscript

Abstract

Graph databases are becoming increasingly popular for modeling different kinds of networks for data analysis. They are built over the property graph data model, where nodes and edges are annotated with property-value pairs. Most existing work in the field is based on graphs were the temporal dimension is not considered. However, time is present in most real-world problems. Many different kinds of changes may occur in a graph as the world it represents evolves across time. For instance, edges, nodes, and properties can be added and/or deleted, and property values can be updated. This paper addresses the problem of modeling, storing, and querying temporal property graphs, allowing keeping the history of a graph database. This paper introduces a temporal graph data model, where nodes and relationships contain attributes (properties) timestamped with a validity interval. Graphs in this model can be heterogeneous, that is, relationships may be of different kinds. Associated with the model, a high-level graph query language, denoted T-GQL, is presented, together with a collection of algorithms for computing different kinds of temporal paths in a graph, capturing different temporal path semantics. T-GQL can express queries like “Give me the friends of the friends of Mary, who lived in Brussels at the same time than her, and also give me the periods when this happened”. As a proof-of-concept, a Neo4j-based implementation of the above is also presented, and a client-side interface allows submitting queries in T-GQL to a Neo4j server. Finally, experiments were carried out over synthetic and real-world data sets, with a twofold goal: on the one hand, to show the plausibility of the approach; on the other hand, to analyze the factors that affect performance, like the length of the paths mentioned in the query, and the size of the graph.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Similar content being viewed by others

Notes

  1. http://www.neo4j.com.

  2. http://janusgraph.org/.

  3. https://www.w3.org/RDF/.

  4. https://neo4j.com/docs/cypher-manual/current/.

  5. https://www.antlr.org/.

  6. http://javalin.io.

  7. https://github.com/neo4j-contrib/neo4j-graph-algorithms.

  8. https://www.kaggle.com/usdot/flight-delays?select=flights.csv.

References

  1. Amagasa, T., Yoshikawa, M., Uemura, S.: A temporal data model for XML documents. In DEXA, pages 334–344, (2000)

  2. Angles, R.: A comparison of current graph database models. In: Proceedings of ICDE Workshops, Arlington, VA, USA, pp. 171–177 (2012)

  3. Angles, R., Arenas, M., Barceló, P., Hogan, A., Reutter, J.L., Vrgoc, D.: Foundations of modern query languages for graph databases. ACM Comput. Surv. 50(5), 68:1–68:40 (2017)

    Article  Google Scholar 

  4. Angles, R.: The property graph database model. In: Proceedings of the 12th Alberto Mendelzon International Workshop on Foundations of Data Management, Cali, Colombia, May 21–25, 2018, Volume 2100 of CEUR Workshop Proceedings. CEUR-WS.org (2018)

  5. Angles, R., Gutierrez, C.: Survey of graph database models. ACM Comput. Surv. 40(1), 1:1–1:39 (2008)

    Article  Google Scholar 

  6. Angles, R., Thakkar, H., Tomaszuk, D.: RDF and property graphs interoperability: status and issues. In: Hogan, A., Milo, T. (eds.) Proceedings of the 13th Alberto Mendelzon International Workshop on Foundations of Data Management, Asunción, Paraguay, June 3–7, 2019, Volume 2369 of CEUR Workshop Proceedings. CEUR-WS.org (2019)

  7. Balmin, A., Papadimitriou, T., Papakonstantinou, Y.: Hypothetical queries in an OLAP environment. In: VLDB 2000, Proceedings of 26th International Conference on Very Large Data Bases, September 10–14, 2000, Cairo, Egypt, pp. 220–231. Morgan Kaufmann (2000)

  8. Byun, J.: Enabling time-centric computation for efficient temporal graph traversals from multiple sources. Accepted for publication, IEEE Trans. Knowl. Data Eng. (2020)

  9. Byun, J., Woo, S., Kim, D.: ChronoGraph: enabling temporal graph traversals for efficient information diffusion analysis over time. IEEE Trans. Knowl. Data Eng. 32(3), 424–437 (2020)

    Article  Google Scholar 

  10. Campos, A., Mozzino, J., Vaisman, A.A: Towards temporal graph databases. In: Pichler, R., da Silva, A.S. (eds.) Proceedings of the 10th Alberto Mendelzon International Workshop on Foundations of Data Management, Panama City, Panama, May 8–10, 2016, Volume 1644 of CEUR Workshop Proceedings. CEUR-WS.org (2016)

  11. Cattuto, C., Panisson, A., Quaggiotto, M.: Representing time dependent graphs in Neo4j. https://github.com/SocioPatterns/neo4j-dynagraph/wiki/Representing-time-dependent-graphs-in-Neo4j (2013)

  12. Cattuto, C., Quaggiotto, M., Panisson, A., Averbuch, A.: Time-varying social networks in a graph database: a neo4j use case. In: First International Workshop on Graph Data Management Experiences and Systems, GRADES 2013, Co-located with SIGMOD/PODS 2013, New York, NY, USA, June 24, 2013, p. 11 (2013)

  13. Chen, C.X., Zaniolo, C.: Universal temporal extensions for database languages. In: IEEE/ICDE, Sydney, Australia (1999)

  14. Chien, S., Tsotras, V., Zaniolo, C.: Efficient management of multiversion documents by object referencing. In: VLDB, pp. 291–300, Rome, Italy (2001)

  15. Clifford, J., Dyreson, C.E., Isakowitz, T., Jensen, C.S., Snodgrass, R.T.: On the semantics of now in databases. ACM Trans. Database Syst. 22(2), 171–214 (1997)

    Article  Google Scholar 

  16. Dave, A., Jindal, A., Li, L.E., Xin, R., Gonzalez, J., Zaharia, M.: Graphframes: an integrated API for mixing graph and relational queries. In: Proceedings of the Fourth International Workshop on Graph Data Management Experiences and Systems, Redwood Shores, CA, USA, June 24–24, 2016, p. 2 (2016)

  17. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1, 269–271 (1959)

    Article  MathSciNet  Google Scholar 

  18. Elmasri, R., Kim, Y.-J., Wuu, G.T.J.: Efficient implementation techniques for the time index. In: Proceedings of the Seventh International Conference on Data Engineering, April 8–12, 1991, Kobe, Japan, pp. 102–111. IEEE Computer Society (1991)

  19. Etzion, O., Jajodia, S., Sripada, S.M. (eds.): Temporal Databases: Research and Practice (the book grow out of a Dagstuhl Seminar, June 23–27, 1997), Volume 1399 of Lecture Notes in Computer Science. Springer (1998)

  20. Francis, N., Green, A., Guagliardo, P., Libkin, L., Lindaaker, T., Marsault, V., Plantikow, S., Rydberg, M., Schuster, M., Selmer, P., Taylor, A.: Formal semantics of the language cypher (2018). CoRR arXiv:1802.09984

  21. Francis, N., Green, A., Guagliardo, P., Libkin, L., Lindaaker, T., Marsault, V., Plantikow, S., Rydberg, M., Selmer, P., Taylor, A.: Cypher: an evolving query language for property graphs. In: Das, G., Jermaine, C.M., Bernstein, P.A. (eds.) Proceedings of the 2018 International Conference on Management of Data, SIGMOD Conference 2018, Houston, TX, USA, June 10–15, 2018, pp. 1433–1445. ACM (2018)

  22. Golfarelli, M., Rizzi, S.: What-if simulation modeling in business intelligence. IJDWM 5(4), 24–43 (2009)

    Google Scholar 

  23. Grandi, F.: T-SPARQL: a tsql2-like temporal query language for RDF. In: Ivanovic, M., Thalheim, B., Catania, B., Budimac, Z., (eds.) Local Proceedings of the Fourteenth East-European Conference on Advances in Databases and Information Systems, Novi Sad, Serbia, September 20–24, 2010, Volume 639 of CEUR Workshop Proceedings, pp. 21–30. CEUR-WS.org (2010)

  24. Green, A.: Gql—initiating an industry standard property graph query language (2018)

  25. Gutiérrez, C., Hurtado, C.A., Vaisman, A.A.: Temporal RDF. In: Gómez-Pérez, A., Euzenat, J. (eds.) The Semantic Web: Research and Applications, Second European Semantic Web Conference, ESWC 2005, Heraklion, Crete, Greece, May 29–June 1, 2005, Proceedings, Volume 3532 of Lecture Notes in Computer Science, pp. 93–107. Springer (2005)

  26. Gutiérrez, C., Hurtado, C.A., Vaisman, A.A.: Introducing time into RDF. IEEE Trans. Knowl. Data Eng. 19(2), 207–218 (2007)

    Article  Google Scholar 

  27. Han, W., Miao, Y., Li, K., Wu, M., Yang, F., Zhou, L., Prabhakaran, V., Chen, W., Chen, E.: Chronos: A graph engine for temporal graph analysis. In: Eurosys, pp. 1–14 (2014)

  28. Hartig, O.: Reconciliation of RDF* and property graphs (2014). CoRR arXiv:1409.3288

  29. Hartig, O.: Position statement: the rdf* and sparql* approach to annotate statements in rdf and to reconcile rdf and property graphs (2019)

  30. Hassan, M.S., Aref, W.G., Aly, A.M.: Graph indexing for shortest-path finding over dynamic sub-graphs. In: Özcan, F., Koutrika, G., Madden, S. (eds.) Proceedings of the 2016 International Conference on Management of Data, SIGMOD Conference 2016, San Francisco, CA, USA, June 26–July 1, 2016, pp. 1183–1197. ACM (2016)

  31. He, H., Sing, A.K: Query language and access methods for graph databases. In: Managing and Mining Graph Data, Volume 40 of Advances in Database Systems, pp. 125–160. Springer US (2010)

  32. Huang, S., Cheng, J., Wu, H.: Temporal graph traversals: definitions, algorithms, and applications (2014). CoRR arXiv:1401.1919

  33. Huo, W., Tsotras, V.J.: Efficient temporal shortest path queries on evolving social graphs. In: Conference on Scientific and Statistical Database Management, SSDBM, Aalborg, Denmark, June 30–July 2, 2014, pp. 38:1–38:4 (2014)

  34. Johnson, T., Kanza, Y., Lakshmanan, L.V.S., Shkapenyuk, V.: Nepal: a path query language for communication networks. In: Arora, A., Roy, S., Mehta, S. (eds.) Proceedings of the 1st ACM SIGMOD Workshop on Network Data Analytics, NDA@SIGMOD 2016, San Francisco, California, USA, July 1, 2016, pp. 6:1–6:8. ACM (2016)

  35. Khurana, U., Deshpande, A.: Efficient snapshot retrieval over historical graph data (2012). CoRR arxiv:1207.5777

  36. Khurana, U., Deshpande, A.: HiNGE: enabling temporal analytics at scale. In: Proceedings of SIGMOD, NY, USA (2013)

  37. Kostakos, V.: Temporal graphs (2008). CoRR arxiv:0807.2357

  38. Kulkarni, K.G., Michels, J.-E.: Temporal features in SQL: 2011. SIGMOD Rec. 41(3), 34–43 (2012)

    Article  Google Scholar 

  39. Kusu, K., Hatano, K.: Recurrent path index for efficient graph traversal. In: 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, December 9–12, 2019, pp. 6107–6109. IEEE (2019)

  40. Lazarevic, L.: Keeping track of graph changes using temporal versioning. https://medium.com/neo4j/keeping-track-of- graph-changes-using-temporal-versioning-3b0f854536fa (2019)

  41. Pokorný, J., Valenta, M., Troup, M.: Indexing patterns in graph databases. In: Bernardino, J., Quix, C. (eds.) Proceedings of the 7th International Conference on Data Science, Technology and Applications, DATA 2018, Porto, Portugal, July 26–28, 2018, pp. 313–321. SciTePress (2018)

  42. Rizzolo, F., Vaisman, A.: Temporal XML: modeling, indexing, and query processing. VLDB J. 1179–1212(5), 39–65 (2008)

    Google Scholar 

  43. Robinson, I., Webber, J.: Graph Databases. O’Reilly Media, Sebastopol (2013)

    Google Scholar 

  44. Rodriguez, M.A.: The gremlin graph traversal machine and language (invited talk). In: Cheney, J., Neumann, T. (eds.) Proceedings of the 15th Symposium on Database Programming Languages, Pittsburgh, PA, USA, October 25–30, 2015, pp. 1–10. ACM (2015)

  45. Semertzidis, K., Pitoura, E.: Top-k durable graph pattern queries on temporal graphs. IEEE Trans. Knowl. Data Eng. 31(1), 181–194 (2019)

  46. Snodgrass, R.T. (ed.): The TSQL2 Temporal Query Language. Kluwer, Dordrecht (1995)

  47. Tansel, A., Clifford, J., Gadia, S. (eds.): Temporal Databases: Theory, Design and Implementation. Benjamin/Cummings, New York (1993)

    Google Scholar 

  48. Tappolet, J., Bernstein, A.: Applied temporal RDF: efficient temporal querying of RDF data with SPARQL. In: The Semantic Web: Research and Applications, 6th European Semantic Web Conference, ESWC 2009, Heraklion, Crete, Greece, May 31–June 4, 2009, Proceedings, Volume 5554 of Lecture Notes in Computer Science, pp. 308–322. Springer (2009)

  49. Terenziani, P., Snodgrass, R.T.: Reconciling point-based and interval-based semantics in temporal relational databases: a treatment of the telic/atelic distinction. IEEE Trans. Knowl. Data Eng. 16(5), 540–551 (2004)

    Article  Google Scholar 

  50. Thakkar, H., Angles, R., Tomaszuk, D., Lehmann, J.: Direct mappings between RDF and property graph databases (2019). CoRR arXiv:1912.02127

  51. Wu, H., Cheng, J., Huang, S., Ke, Y., Yi, L., Yanyan, X.: Path problems in temporal graphs. PVLDB 7(9), 721–732 (2014)

    Google Scholar 

  52. Wu, H., Cheng, J., Ke, Y., Huang, S., Huang, Y., Hejun, W.: Efficient algorithms for temporal path computation. IEEE Trans. Knowl. Data Eng. 28(11), 2927–2942 (2016)

    Article  Google Scholar 

  53. Wu, H., Cheng, J., Lu, Y., Ke, Y., Huang, Y., Yan, D., Wu, H.: Core decomposition in large temporal graphs. In: 2015 IEEE International Conference on Big Data, Big Data 2015, Santa Clara, CA, USA, October 29–November 1, 2015, pp. 649–658 (2015)

  54. Wu, H., Huang, Y., Cheng, J., Li, J., Ke, Y.: Reachability and time-based path queries in temporal graphs. In: 32nd IEEE International Conference on Data Engineering, ICDE 2016, Helsinki, Finland, May 16–20, 2016, pp. 145–156 (2016)

  55. Yang, Y., Yan, D., Wu, H., Cheng, J., Zhou, S., Lui, J.C.S.: Diversified temporal subgraph pattern mining. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13–17, 2016, pp. 1965–1974 (2016)

Download references

Acknowledgements

Alejandro Vaisman and Valeria Soliani were partially supported by Project PICT 2017-1054, from the Argentinian Scientific Agency.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alejandro Vaisman.

Ethics declarations

Conflict of interest

The authors declare no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: Characteristics of the data sets

See Table 8.

Table 8 Number of incoming and outgoing flights for each airport

Appendix B: Summary of main concepts

See Table 9.

Table 9 Continuous paths experiments: Characteristics of each social network data set

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Debrouvier, A., Parodi, E., Perazzo, M. et al. A model and query language for temporal graph databases. The VLDB Journal 30, 825–858 (2021). https://doi.org/10.1007/s00778-021-00675-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00778-021-00675-4

Keywords

Navigation