added parent Id to RowMetadata and provided batching for each level of t...

...he tree