make tentative parent children search based on maps
improve sqls to lookup dependencies