# US 2014/0156696 A1 · Dynamic generation of database queries in query builders

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

- Number: US 2014/0156696 A1
- Document ID: US20140156696A1
- Status: Published application
- Kind: A1
- Application number: 13/693,061
- Filed: 2012-12-04
- Published: 2014-06-05
- Earliest claimed: 2012-12-04
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Deepak Goel
- Web page: https://patentgrep.com/patent/US20140156696A1

## CPC

- G06F 16/2428: {Query predicate definition using graphical user interfaces, including menus and forms (G06F16/2423 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A query builder provided according to an aspect of the present invention facilitates users to conveniently generate database queries directed to database servers storing data elements organized according to attributes. In an embodiment, configuration data indicating a comparison predicate to be used for each combination of an attribute and a conditional operation is maintained. A user may then provide as inputs a first attribute, a first conditional operation and a first value. In response, the query builder examines the configuration data to determine a first comparison predicate specified for the combination of the first attribute and the first conditional operation. The query builder incorporates the first value in the first comparison predicate to construct a second comparison predicate and then forms a first database query with the second comparison predicate.

## Claims

### Claim 1

A method of generating database queries directed to a database server, said database server storing data elements organized according to attributes, said method comprising:
maintaining configuration data indicating a comparison predicate to be used for each combination of an attribute and a conditional operation;
receiving from a user a first attribute, a first conditional operation and a first value;
examining said configuration data to determine a first comparison predicate specified for the combination of said first attribute and said first conditional operation;
incorporating said first value in said first comparison predicate to construct a second comparison predicate; and
forming a first database query with said second comparison predicate.

### Claim 2 (depends on 1)

The method of claim 1, wherein said database server is implemented according to a relational database technology, wherein said first database query is formed according to SQL (structured query language) as an SQL query.

### Claim 3 (depends on 2)

The method of claim 2, wherein said forming comprises including said second comparison predicate in a WHERE clause of said SQL query.

### Claim 4 (depends on 3)

The method of claim 3, wherein said forming further comprises including a set of columns to be retrieved in a SELECT clause of said SQL query, and a set of tables containing said set of columns in a FROM clause of said SQL query.

### Claim 5 (depends on 1)

The method of claim 1, wherein said first comparison predicate includes a first place holder for a user to provide a value corresponding to said first attribute,
wherein said incorporating comprises replacing said first placeholder with said first value.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
modifying said first comparison predicate to a third comparison predicate in said configuration data at a first time instance, wherein said modifying is performed in view of a change to a business logic using which data elements for said first attribute are to be retrieved, said first time instance being after said forming of said first database query; and
receiving, after said first time instance, said first attribute, said first conditional operation and said first value,
wherein said examining determines said third comparison predicate as being specified for the combination of said first attribute and said first conditional operation,
wherein said incorporating incorporates said first value in said third comparison predicate to construct a fourth comparison predicate,
wherein said forming forms a second database query with said fourth comparison predicate.

### Claim 7

A non-transitory machine readable medium storing one or more sequences of instructions for causing a system to generate database queries directed to a database server, said database server storing data elements organized according to attributes, wherein execution of said one or more instructions by one or more processors contained in said system causes said system to perform the actions of:
maintaining configuration data indicating a comparison predicate to be used for each combination of an attribute and a conditional operation;
receiving from a user a first attribute, a first conditional operation and a first value;
examining said configuration data to determine a first comparison predicate specified for the combination of said first attribute and said first conditional operation;
incorporating said first value in said first comparison predicate to construct a second comparison predicate; and
forming a first database query with said second comparison predicate.

### Claim 8 (depends on 8)

The machine readable medium of claim 8, wherein said database server is implemented according to a relational database technology, wherein said first database query is formed according to SQL (structured query language) as an SQL query.

### Claim 9 (depends on 8)

The machine readable medium of claim 8, wherein said forming comprises one or more instructions for including said second comparison predicate in a WHERE clause of said SQL query.

### Claim 10 (depends on 9)

The machine readable medium of claim 9, wherein said forming further comprises one or more instructions for including a set of columns to be retrieved in a SELECT clause of said SQL query, and a set of tables containing said set of columns in a FROM clause of said SQL query.

### Claim 11 (depends on 7)

The machine readable medium of claim 7, wherein said first comparison predicate includes a first place holder for a user to provide a value corresponding to said first attribute,
wherein said incorporating comprises one or more instructions for replacing said first placeholder with said first value.

### Claim 12 (depends on 1)

The machine readable medium of claim 1, further comprising one or more instructions for:
modifying said first comparison predicate to a third comparison predicate in said configuration data at a first time instance, wherein said modifying is performed in view of a change to a business logic using which data elements for said first attribute are to be retrieved, said first time instance being after said forming of said first database query; and
receiving, after said first time instance, said first attribute, said first conditional operation and said first value,
wherein said examining determines said third comparison predicate as being specified for the combination of said first attribute and said first conditional operation,
wherein said incorporating incorporates said first value in said third comparison predicate to construct a fourth comparison predicate,
wherein said forming forms a second database query with said fourth comparison predicate.

### Claim 13

A digital processing system comprising:
a processor;
a random access memory (RAM);
a machine readable medium to store one or more instructions, which when retrieved into said RAM and executed by said processor causes said digital processing system to generate database queries directed to a database server, said database server storing data elements organized according to attributes, said digital processing system performing the actions of:
maintaining configuration data indicating a comparison predicate to be used for each combination of an attribute and a conditional operation;
receiving from a user a first attribute, a first conditional operation and a first value;
examining said configuration data to determine a first comparison predicate specified for the combination of said first attribute and said first conditional operation;
incorporating said first value in said first comparison predicate to construct a second comparison predicate; and
forming a first database query with said second comparison predicate.

### Claim 14 (depends on 13)

The digital processing system of claim 13, wherein said database server is implemented according to a relational database technology, wherein said first database query is formed according to SQL (structured query language) as an SQL query.

### Claim 15 (depends on 14)

The digital processing system of claim 14, wherein said forming comprises including said second comparison predicate in a WHERE clause of said SQL query.

### Claim 16 (depends on 15)

The digital processing system of claim 15, wherein said forming further comprises including a set of columns to be retrieved in a SELECT clause of said SQL query, and a set of tables containing said set of columns in a FROM clause of said SQL query.

### Claim 17 (depends on 13)

The digital processing system of claim 13, wherein said first comparison predicate includes a first place holder for a user to provide a value corresponding to said first attribute,
wherein said incorporating comprises replacing said first placeholder with said first value.

### Claim 18 (depends on 1)

The digital processing system of claim 1, further performing the actions of:
modifying said first comparison predicate to a third comparison predicate in said configuration data at a first time instance, wherein said modifying is performed in view of a change to a business logic using which data elements for said first attribute are to be retrieved, said first time instance being after said forming of said first database query; and
receiving, after said first time instance, said first attribute, said first conditional operation and said first value,
wherein said examining determines said third comparison predicate as being specified for the combination of said first attribute and said first conditional operation,
wherein said incorporating incorporates said first value in said third comparison predicate to construct a fourth comparison predicate,
wherein said forming forms a second database query with said fourth comparison predicate.
