cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Designing a database for querying by timestamp across multiple scenarios

davideps
Node Link

How might one setup a neo4j database to query versions of entities, relationships, and properties that change both in time and along parallel (or branching) timelines? Greycat refers to this as many-worlds--it is used in scenario analysis in urban planning, branching narratives in gaming, and likely other domains. With neo4j, is this handled via timetrees, versioning, partitioning? The only requirement is that the entities, relationships, and properties have unique IDs with values that vary along two or more dimensions (e.g. time & branch).

2 REPLIES 2

I think if you use a common approach to versioning in a graph, it should work for you. The basic concept is to separate the concepts of identity and state. The root node is the identity of whatever it is you're versioning and it has relationships to the various versions or state history of that identity node. In those state nodes you can use your timestamps to track from start time to end time that a state was active.

Helpful article https://neo4j.com/graphgist/network-versions

davideps
Node Link

Thanks @mike.r.black. I'll read the material you linked to.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online