Study about storing trees in SQL