1. A method of locating a path from a descendent node to a root node in a document containing hierarchical information, the method comprising: joining a table holding information of the descendent node and a table holding information of the root node, wherein each of the tables has a primary key and a foreign key, columns of the table holding the descendent node information are selected, and predicates for the join are taken over the primary and foreign keys of the table holding the descendent node information and the table holding the root node information.