# US 2012/0254178 A1 · System and method for processing an sql query made against a relational database

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

- Number: US 2012/0254178 A1
- Document ID: US20120254178A1
- Status: Published application
- Kind: A1
- Application number: 13/397,710
- Filed: 2012-02-16
- Published: 2012-10-04
- Earliest claimed: 2011-03-29
- Assignees: Wipro Limited
- Inventors: Sudarshan Srinivasa Murthy
- Web page: https://patentgrep.com/patent/US20120254178A1

## CPC

- G06F 16/24537: {of operators}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for processing an SQL query made against a relational database is disclosed. In one example embodiment, the method includes receiving the SQL query made against the relational database. Further, the received SQL query is parsed to obtain each operator and associated one or more operands and sequence of execution of the operators. Furthermore, a closure-friendly operator is dynamically generated for each operator and the associated one or more operands in the received SQL query. In addition, the dynamically generated closure-friendly operators are executed based on the obtained sequence of execution of the operators.

## Claims

### Claim 1

A computer-implemented method for processing an SQL query made against a relational database, comprising:
parsing the SQL query to obtain each operator and associated one or more operands and sequence of execution of the operators;
dynamically generating a closure-friendly operator for each operator and the associated one or more operands in the SQL query; and
executing the dynamically generated closure-friendly operators based on the obtained sequence of execution of the operators.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving the SQL query made against the relational database.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein dynamically generating the closure-friendly operator for each operator and the associated one or more operands in the SQL query comprises:
dynamically generating the closure-friendly operator for each operator and the associated one or more operands using optimization techniques.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein the optimization techniques are selected from the group consisting of just-in-time compilation, code caching, code libraries, lazy evaluation and the like.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
grouping each dynamically generated closure-friendly operator into possibly overlapping patterns; and
classifying impact of each pattern on a queried relational database and a database schema.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, further comprising:
analyzing the SQL query using partitions of the closure-friendly operators; and
tracing/debugging the SQL query based on the analysis.

### Claim 7

A computer-implemented method for processing an SQL query made against a relational database, comprising:
receiving the SQL query made against the relational database;
parsing the received SQL query to obtain each operator and associated one or more operands and sequence of execution of the operators;
dynamically generating a closure-friendly operator for each operator and the associated one or more operands in the received SQL query;
grouping each dynamically generated closure-friendly operator into possibly overlapping patterns; and
classifying impact of each pattern on a queried relational database and a database schema.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, further comprising:
analyzing the received SQL query using partitions of the closure-friendly operators; and
tracing/debugging the received SQL query based on the analysis.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein dynamically generating the closure-friendly operator for each operator and the associated one or more operands in the received SQL query comprises:
dynamically generating the closure-friendly operator for each operator and the associated one or more operands using optimization techniques.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein the optimization techniques are selected from the group consisting of just-in-time compilation, code caching, code libraries, lazy evaluation and the like.

### Claim 11

A system for processing an SQL query made against a relational database, comprising:
one or more clients;
a network;
a relational database; and
a computer coupled to the one or more clients and the relational database via the network, where in the computer comprises:
a processor;
memory operatively coupled to the processor; and
a database management system including a closure-friendly SQL query processor residing in the memory, wherein the closure-friendly SQL query processor receives the SQL query made against the relational database from the one or more clients via the network, wherein the closure-friendly SQL query processor parses the received SQL query to obtain each operator and associated one or more operands and sequence of execution of the operators, wherein the closure-friendly SQL query processor dynamically generates a closure-friendly operator for each operator and the associated one or more operands in the received SQL query, wherein the closure-friendly SQL query processor executes the dynamically generated closure-friendly operators based on the obtained sequence of execution of the operators.

### Claim 12 (depends on 11)

The system of claim 11, wherein the closure-friendly SQL query processor dynamically generates the closure-friendly operator for each operator and the associated one or more operands using optimization techniques.

### Claim 13 (depends on 12)

The system of claim 12, wherein the optimization techniques are selected from the group consisting of just-in-time compilation, code caching, code libraries, lazy evaluation and the like.

### Claim 14 (depends on 11)

The system of claim 11, wherein the closure-friendly SQL query processor groups each dynamically generated closure-friendly operator into possibly overlapping patterns, and wherein the closure-friendly SQL query processor classifies impact of each pattern on a queried relational database and a database schema.

### Claim 15 (depends on 14)

The system of claim 14, wherein the closure-friendly SQL query processor.
analyzing the received SQL query using partitions of the closure-friendly operators; and
tracing/debugging the received SQL query based on the analysis.

### Claim 16

A non-transitory computer-readable storage medium for processing an SQL query made against a relational database, having instructions that, when executed by a computing device cause the computing device to:
receiving the SQL query made against the relational database;
parsing the received SQL query to obtain each operator and associated one or more operands and sequence of execution of the operators;
dynamically generating a closure-friendly operator for each operator and the associated one or more operands in the received SQL query; and
executing the dynamically generated closure-friendly operators based on the obtained sequence of execution of the operators.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein dynamically generating the closure-friendly operator for each operator and the associated one or more operands in the received SQL query comprises:
dynamically generating the closure-friendly operator for each operator and the associated one or more operands using optimization techniques.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the optimization techniques are selected from the group consisting of just-in-time compilation, code caching, code libraries, lazy evaluation and the like.

### Claim 19 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, further comprising:
grouping each dynamically generated closure-friendly operator into possibly overlapping patterns; and
classifying impact of each pattern on a queried relational database and a database schema.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, further comprising:
analyzing the received SQL query using partitions of the closure-friendly operators; and
tracing/debugging the received SQL query based on the analysis.
