# US 2008/0306910 A1 · Method and process for end users to query hierarchical data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0306910 A1
- Document ID: US20080306910A1
- Status: Published application
- Kind: A1
- Application number: 11/760,649
- Filed: 2007-06-08
- Published: 2008-12-11
- Earliest claimed: 2007-06-08
- Assignees: International Business Machines Corporation
- Inventors: Hardeep Singh
- Web page: https://patentgrep.com/patent/US20080306910A1

## CPC

- G06F 16/832: Query formulation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the invention provide techniques for specifying precise queries of hierarchical data. In one embodiment, a mapping template is created to represent the hierarchical data in terms that are easy to for users to understand. The mapping template is used to generate a query tool having a tree structure made up of nodes that are queried by the user. The user may compose a query by navigating the tree structure to select nodes of interest, and specifying predicates for the selected nodes. Once the query is composed, it may be executed against the hierarchical data.

## Claims

### Claim 1

A computer-implemented method of composing a query of hierarchical data, comprising:
receiving a selection of at least one query node from a set of one or more query nodes included in a query tool, wherein each query node represents elements of the hierarchical data, and wherein a mapping template specifies mappings from the one or more query nodes of the query tool to the elements of the hierarchal data
presenting, in the query tool, a form for entering a query predicate corresponding to the at least one selected query node;
receiving, in the query tool, one or more query predicates specified in the form;
composing a query of the hierarchical data from a base query, the one or more query predicates, and the mapping template, wherein the base query identifies a data source for the composed query; and
modifying the base query to include the one or more query predicates.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
executing the composed query to obtain a query result; and
presenting the query result to the user of the query tool.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more query nodes of the query tool are presented in a tree representation of the hierachal data.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more query nodes specified in the mapping template comprise nodes of the hierarchical data that is queried by the user of the query tool.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein composing the query comprises evaluating any query annotations defined in the mapping template, wherein the query annotations specify elements that are included in each query composed using the query tool, and wherein the query annotations are hidden from the user of the query tool.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein composing the query comprises incorporating a data path defined in the mapping template, wherein the data path is used to identify locations of data in the hierarchical data.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the form includes at least one of a default value and a validation rule, wherein the default value provides a predefined set of values available for composing query predicates corresponding to the selected at least one query node, and wherein the validation rule constrains what the user may enter into the form, wherein the default values and validation rules are defined in the mapping template.

### Claim 8

A computer program product comprising a computer-useable storage medium having a computer readable program resident thereon, wherein the computer readable program, when executed on by one or more processors, causes the one or more processors to perform an operation comprising:
receiving a selection of at least one query node from a set of one or more query nodes included in a query tool, wherein each query node represents elements of the hierarchical data, and wherein a mapping template specifies mappings from the one or more query nodes of the query tool to the elements of the hierarchal data;
presenting, in the query tool, a form for entering a query predicate corresponding to the at least one selected query node;
receiving, in the query tool, one or more query predicates specified in the form;
composing a query of the hierarchical data from a base query, the one or more query predicates, and the mapping template, wherein the base query identifies a data source for the composed query; and
modifying the base query to include the one or more query predicates.

### Claim 9 (depends on 8)

The computer-useable storage medium of claim 8, wherein the operation further comprises:
executing the composed query to obtain a query result; and
presenting the query result to the user of the query tool.

### Claim 10 (depends on 8)

The computer-readable storage medium of claim 8, wherein the one or more query nodes of the query tool are presented in a tree representation of the hierachal data.

### Claim 11 (depends on 8)

The computer-useable storage medium of claim 8, wherein the one or more query nodes specified in the mapping template comprise nodes of the hierarchical data that is queried by the user of the query tool.

### Claim 12 (depends on 8)

The computer-useable storage medium of claim 8, wherein composing the query comprises evaluating any query annotations defined in the mapping template, wherein the query annotations specify elements that are included in each query composed using the query tool, and wherein the query annotations are hidden from the user of the query tool.

### Claim 13 (depends on 8)

The computer-useable storage medium of claim 8, wherein composing the query comprises incorporating a data path defined in the mapping template, wherein the data path is used to identify locations of data in the hierarchical data.

### Claim 14 (depends on 8)

The computer-useable storage medium of claim 8, wherein the form includes at least one of a default value and a validation rule, wherein the default value provides a predefined set of values available for composing query predicates corresponding to the selected at least one query node, and wherein the validation rule constrains what the user may enter into the form, wherein the default values and validation rules are defined in the mapping template.

### Claim 15

A system, comprising:
a processor; and
a memory containing a program configured to compose a query of hierarchical data by performing an operation, comprising:
receiving a selection of at least one query node from a set of one or more query nodes included in a query tool, wherein each query node represents elements of the hierarchical data, and wherein a mapping template specifies mappings from the one or more query nodes of the query tool to the elements of the hierarchal data;
presenting, in the query tool, a form for entering a query predicate corresponding to the at least one selected query node;
receiving, in the query tool, one or more query predicates specified in the form;
composing a query of the hierarchical data from a base query, the one or more query predicates, and the mapping template, wherein the base query identifies a data source for the composed query; and
modifying the base query to include the one or more query predicates.

### Claim 16 (depends on 15)

The system of claim 15, wherein the operation further comprises:
executing the composed query to obtain a query result; and
presenting the query result to the user of the query tool.

### Claim 17 (depends on 15)

The system of claim 15, wherein the one or more query nodes of the query tool are presented in a tree representation of the hierachal data.

### Claim 18 (depends on 15)

The system of claim 15, wherein the one or more query nodes specified in the mapping template comprise nodes of the hierarchical data that is queried by the user of the query tool.

### Claim 19 (depends on 15)

The system of claim 15, wherein composing the query comprises evaluating any query annotations defined in the mapping template, wherein the query annotations specify elements that are included in each query composed using the query tool, and wherein the query annotations are hidden from the user of the query tool.

### Claim 20 (depends on 15)

The system of claim 15, wherein composing the query comprises incorporating a data path defined in the mapping template, wherein the data path is used to identify locations of data in the hierarchical data.

### Claim 21 (depends on 15)

The system of claim 15, wherein the form includes at least one of a default value and a validation rule, wherein the default value provides a predefined set of values available for composing query predicates corresponding to the selected at least one query node, and wherein the validation rule constrains what the user may enter into the form, wherein the default values and validation rules are defined in the mapping template.
