I want to create a Vertex of label foo, which contains a property child
. Child property will have two properties A, B. Child in itself can contain more nested children.
If vertex foo is deleted, its all properties including child property should be deleted. My query pattern would be to query all vertexes of label foo which has property A = 'bar'
This can be easily represented by representing the child as vertices instead of property, but then the child has to be deleted by doing dfs/bfs originating from vertex foo. This is proving a costly affair. If childs are saved as property, drop operation will be saved of dfs/bfs.
How do I create nested properties and how can I query them using apache tinkerpop. Is there any other data model I can adopt to reduce the query cost.