create hierarchy table
inserting hierarchy data