SMS: Hypertree Decompositions and Tractable Queries