retrieve tree structure from tbl

Data Output, from tbl to tree structure is completed.
Data Input to tbl may lead to fail, since all rows in tbl  should be
numerated as seamless continuing serie.