I'm currently evaluating neo4j for our hand-knitted graph-like legacy persistence framework, which became too slow for some new use cases
The main requirement is to store temporal master data and query this data for a specific date in the sense of "What did the world look like at that given date", which, as far as I can imagine, corresponds to a query in a sub-graph. The connection may sound a bit poor, but in our current implementation each node and relationship has at least 2 attributes that indicate the start and end dates of its validity. So in this sub-graph query we would only consider nodes and relationships whose start and end attributes form an interval where the query parameter lays in between. That sound reasonable?
I can easily construct a cypher query for a particular use case where the above constraints apply. I even managed to write a procedure that yields paths from a given start node where all following nodes and relationships satisfy the temporal constraints.
But now I'm stuck..! 'Cause my aim is to build an easy to use interface where the client software has no need to know how the temporal aspects affect the final query.
I found that stuff like
MATCH path=(p:Person) -[:WORKS_FOR]-> (c:Company) WHERE ALL(node IN nodes(path) WHERE node IN subGraph) AND ALL(rel IN relationships(path) WHERE rel IN subGraph) RETURN p
but with this in hand, a user can not simply write queries like
MATCH (p:Person) -[:WORKS_FOR]-> (c:Company) RETURN p
because he would have to know about my sub-graph solution. The whole temporal stuff would have to be addable like a parenthesis.
You see the point?
Maybe I am on the wrong track and you see a completely different solution. In any case it would be nice to hear one or the other thought about it.