OrientDB query for hierarchical data -
orientdb server v2.0.10 , trying come query following scenario. i have 2 hierarchies: a->b->c , d->e->f number of nodes in hierarchy can change. node in 1st hierarchy can connected other hierarchy using relation 'assigned'. want parent node of 2nd hierarchy if there incoming edge of node in 2nd hierarchy 1st. for example, have car-child->engine-child->piston , country-child->state-child->city , relationship made_in relates car or engine or piston either country or state or city if there relation either of country or state or city, country should returned. example, engine1-made_in->berlin, return germany. sorry such toyish example. hope clear. thanks. you should consider reading chapter "traversing" - should missing link answer question. can find here: http://orientdb.com/docs/last/sql-traverse.html basically, if think of graph family tree, want achieve 3 things: find children, grand-children, grand-grand-children (an...