I want to store a Bill of materials(BOM) in neo4j. It is a tree schema.
below will be the queries :
- Get Complete tree for a product/part
- Get all the descendants of a node
- Get all the ascendents of a node
- Get all the descendants of a node restricted to a level n
- Get all the ascendents of a node restricted to a level n
- Get level nth ascendant of a node
- Get level nth descendent of a node
I want the output as a tree. In a nested manner.
for e.g:
{
type:"transport",
name:"xyz",
child:[{
type:"airways",
name:"pqr"
},{
type:"waterways",
name:"qwe",
child:
[{
type:"ships",
name:"asd"
},{
type:"sub-marine",
name:"cfv"
},]}}{
type:"roadways",
name:"dffd"
}]}