# US 10,769,139 B2 · System and method for implementing query tagging

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

- Number: US 10,769,139 B2
- Document ID: US10769139B2
- Status: Granted
- Kind: B2
- Application number: 16/040,589
- Filed: 2018-07-20
- Published: 2019-01-24
- Granted: 2020-09-08
- Earliest claimed: 2017-07-24
- Assignees: JPMorgan Chase Bank, N.A.
- Applicants: JPMorgan Chase Bank, N.A.
- Inventors: Daniel J. Gaier
- Web page: https://patentgrep.com/patent/US10769139B2

## CPC

- G06F 16/2443: {Stored procedures}
- G06F 8/315: {Object-oriented languages}
- G06F 9/4488: {Object-oriented}
- G06F 9/54: Interprogram communication
- G06F 16/24573: {using data annotations, e.g. user-defined metadata}
- G06F 16/252: {between a Database Management System and a front-end application}
- G06F 16/284: {Relational databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The invention relates to applying a query tag in an object relational mapping tool. According to an embodiment of the present invention, a system comprises: a Repository API; a relational database management system (RDBMS); an object relational mapping (ORM) Tool that receives input from the Repository API and translates the input to the RDBMS; and a processor, coupled to the Repository API, the ORM Tool and the RDMBS, configured to perform the steps comprising: determine, at the Repository API, a query tag that identifies an origination source code; propagate the query tag to a database connection context within the ORM Tool; and inject the query tag into a generated SQL command.

## Claims

### Claim 1

A system that implements a query tag in an object relational mapping tool, the system comprising:
a repository;
a Repository Application Programming Interface (API) that receives a request to access the repository;
an Object Relational Mapping (ORM) Tool that receives the request from the Repository API and translates the request into a query that is executable by the repository; and
a processor, coupled to the Repository API, the ORM Tool and the repository, configured to perform the steps comprising:
receiving an application code that generates a SQL command;
generating, at the Repository API, a query tag that identifies the application code that represents an origination source code;
injecting the query tag into the SQL command; and
executing the SQL command with the query tag on the repository.

### Claim 2 (depends on 1)

The system of claim 1, wherein the query tag is added as a SQL comment.

### Claim 3 (depends on 1)

The system of claim 1, wherein the repository is part of a Relational Database Management System (RDBMS).

### Claim 4 (depends on 1)

The system of claim 1, further comprising an interactive user interface coupled to the processor.

### Claim 5 (depends on 4)

The system of claim 4, wherein the interactive user interface enables a user to modify the SQL command.

### Claim 6 (depends on 4)

The system of claim 4, wherein the interactive user interface displays performance metrics for the SQL command.

### Claim 7 (depends on 4)

The system of claim 4, wherein the interactive user interface displays the SQL command, corresponding query tag and associated source information.

### Claim 8 (depends on 7)

The system of claim 7, wherein the SQL command comprises a SQL query.

### Claim 9 (depends on 1)

The system of claim 1, wherein the ORM Tool implements a repository pattern to centralize data access operations.

### Claim 10 (depends on 1)

The system of claim 1, wherein the ORM Tool implements extensibility points to inject logic that identifies the originating source code.

### Claim 11

A method that implements a query tag in an object relational mapping tool, the method comprising the steps of:
receiving, at a Repository Application Programming Interface (API), an application code that generates a SQL command;
generating, at the Repository API, a query tag that identifies the application code that represents an origination source code;
injecting, at an Object Relational Mapping (ORM) Tool, the query tag into the SQL command; and
executing the SQL command with the query tag on the repository;
wherein the ORM Tool comprises a processor coupled to the Repository API and the repository.

### Claim 12 (depends on 11)

The method of claim 11, wherein the query tag is added as a SQL comment.

### Claim 13 (depends on 11)

The method of claim 11, wherein the repository is part of a Relational Database Management System (RDBMS).

### Claim 14 (depends on 11)

The method of claim 11, wherein the ORM Tool is further coupled to an interactive user interface.

### Claim 15 (depends on 14)

The method of claim 14, wherein the interactive user interface enables a user to modify the SQL command.

### Claim 16 (depends on 14)

The method of claim 14, wherein the interactive user interface displays performance metrics for the SQL command.

### Claim 17 (depends on 14)

The method of claim 14, wherein the interactive user interface displays the SQL command, corresponding query tag and associated source information.

### Claim 18 (depends on 17)

The method of claim 17, wherein the SQL command comprises a SQL query.

### Claim 19 (depends on 11)

The method of claim 11, wherein the ORM Tool implements a repository pattern to centralize data access operations.

### Claim 20 (depends on 11)

The method of claim 11, wherein the ORM Tool implements extensibility points to inject logic that identifies the originating source code.
