neo4j: Handling optional relationships by Mark Needham.
From the post:
On my ThoughtWorks neo4j there are now two different types of relationships between people nodes – they can either be colleagues or one can be the sponsor of the other.
Getting the information/relationships “in” wasn’t a problem. Getting the required information back out, that was a different story.
A useful illustration of how establishing the desired result (output in this case) can clarify what needs to be asked.
Don’t jump to the solution. Read the post and write down how you would get the desired results.
I first saw this at DZone’s Neo4j page.