Patent ID: 7469249

Claim:
A method of modifying a relational-to-hierarchical mapping in accordance with at least one user query, the method comprising the steps of: obtaining at least one query associated with a query language that supports a hierarchical data structure, and obtaining at least one relational-to-hierarchical mapping for use in translating data associated with a relational data structure into data associated with the hierarchical data structure; modifying the at least one relational-to-hierarchical mapping based on the at least one query such that data specifically relevant to the at least one query may be generated in accordance with the modified relational-to-hierarchical mapping; analyzing the at least one query to identify one or more expressions associated with the at least one query; wherein the step of modifying the at least one relational-to-hierarchical mapping based on the at least one query further comprises the steps of: applying each of the one or more expressions respectively to one or more tagging trees defining the relational-to-hierarchical mapping, each tagging tree comprising one or more nodes, and attaching one or more formulas to appropriate nodes in each tagging tree; marking the tagging tree nodes traversed during the expression application step as visited; marking the node corresponding to an output node of the expression as an end node; superimposing the modified tagging trees respectively resulting from the application of each expression to form a resulting tagging tree; and removing the nodes not marked as visited from the resulting tagging tree, the resulting tagging tree representing the modified relational-to-hierarchical mapping; wherein at least a portion of the one or more formulas are pushed up from a child node of a tagging tree to a parent node of the tagging tree so as to further limit the amount of data being generated.