Java app modeling SQL statements and trees.