Although graph databases are widely used to manage graph-oriented data, they do not account for the temporal dimension. However, most real-world graphs are dynamic which implies that a special emphasis should be placed to include a time support in graph engines. In this context, we introduce T-Cypher: a temporal graph query language that extends the well-known language Cypher with user-friendly temporal constructs.
Our main goal is to emphasize the need of a native temporal query language and its usability in a wide range of use cases.

To learn more about the project, we invite you to watch the DEMO video: https://www.youtube.com/watch?v=4R-Rv4dOz9g.

What is a Temporal Property Graph?

A temporal graph is a collection of nodes, relationships and property values that are assigned each with a set of validity time intervals to indicate the time when the graph entity was valid.

In the right-side graph, for instance, Each relationship indicating between a product and machine is assigned with a time interval indicating the time during which the product was in the manufacturing machine. Furthermore, the property Status that refers indicates whether the machine is in Normal state (N) or Out-of-service (O). This property can be seen as a sequence of pair composed each of a value and a validity interval indicating when the value was recorded.

What is T-Cypher?

T-Cypher is a temporal graph query language that extends the well-known query language Cypher with temporal constructs. The syntax of T-Cypher is designed with a native temporal support which permits expressing temporal queries while limiting their verbosity. Indeed, writing a temporal query with the built-in query constructs of a non-temporal query increases the verbosity of queries.

RANGE_SLICE [t2, t7]

MATCH (p:Product)-[i:isIn]->(m:Machine)

RETURN p, m, i@T

To give an intuition of the T-Cypher syntax, let’s consider the above T-Cypher query applied on the toy graph of the previous section. This query returns, for each machine (m), the products (p) that were recorded inside that machine and the time spent by each product in that machine (i@T).  The RANGE_SLICE token is used to set a time window on all the variables of the query. Having this, the time intervals of variables refering to products, machine and relationship ‘In’ should intersect with [t2, t7].


Adding temporal information of interactions leads to a better analysis and prediction of the underlying phenomena. For example, using a temporal graph in transportation networks leads to more accurate route planning, that is essential in critical situations, such as evacuation planning from disastrous regions to safer ones. Another application is found in environmental sciences: dynamic models for sensor networks deployed in water treatment plants can enable monitoring anomalies in such systems. In this way, one can predict and thus prevent outgrowing hot-spots such as harmful pathogen spills. Furthermore, the analysis of temporal graphs in human mobility networks enables tracking contagious disease propagation and thus leads to more accurate immunization strategies. Social IoT networks is another potential use of dynamic graph models such that modelling the highly dynamic connections between IoT devices can open the way to many new promising applications.


  • In the Docs page, a detailed description of the semantics of each temporal query construct is given.
  • In the Integration page, a description of the integration mechanism of T-Cypher into a non-temporal graph database is provided.
  • In the Examples page, examples of T-Cypher queries and their translation into Cypher queries applied on different real-world scenarios are provided.
  • In the Demo page, a video of a demo that shows the usability of T-Cypher in many real-world scenarios will be downloaded.

Related work

Comments are closed.