SQL structured data modeling for two hierarchal structures.