I am creating a PERT tool, and adapting this tutorial to my case.
What I want to do is forbidding the creation of relationships, and the creation of properties:
The START node (which is an :EndPoint, not an :Activity) should not have predecessors, only successors
The FINISH node (which is an :EndPoint, not an :Activity) should not have successors, only predecessors
No CYCLE allowed
I have not found a way to block these relationships creations. The constraints do not seem to be what I want to do, the UNIQUENESS is not at all what I am looking for.
I tried to take the problem in an other way :
but for the 3rd point, I have no idea, and the "reverse-thinking" could be a solution, but I did not find how to apply it.
If you have any idea, even not working, but giving a new vision, I would really appreciate.
Contrary to what is custom here I'm going to give an opinion. The reason being that you're actually not talking about restrictions at the level of the database (aka schema) but restrictions at the level of your problem (aka business rules).
There are lots of ways to implement business logic the main (and probably the best) one being ... in your application logic.
A Neo4j specific one would be to use user defined procedures. Not unlike the use of stored procedures and triggers that you might use to solve similar problems in an RDBMS such as Oracle.
Hope this helps.
Regards, Tom