IP Library › Granted Patent US 10,552,416
Granted Patent B2
US 10,552,416 · App. 15/236,364 · Granted Feb 4, 2020

Processing SQL statement in alternating modes

Inventor: Eric Kass (Mannheim, DE)
Assignee: International Business Machines Corporation
G06F16/2455G06F16/2423G06F16/2433
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,552,416
App. No.
15/236,364
Granted
Feb 4, 2020
Kind
B2
Abstract

A Processing method for processing SQL statements of different flavors by a database management system may be provided. The method comprises receiving SQL statements of different SQL flavors, parsing each received SQL statement for identifying an SQL flavor characteristic, tracking an SQL statement identifier of a related SQL PREPARE operation for determining the SQL flavor characteristic at subsequent DMBS operations, adapting a DBMS mode of the DBMS dynamically to the identified SQL flavor characteristic, adapting another received SQL statement to a DBMS mode of the database management system, and sending each of the adapted SQL statements to the DBMS for the SQL PREPARE operation under the adapted database management system mode.

Claims (50)

1. A method comprising:

receiving a first structured query language (SQL) query;

parsing the first SQL query to determine that syntax and semantics of the first SQL query correspond to a first flavor of a plurality of flavors;

setting a database to a first database system management mode of a plurality of database system management modes, with a selection of the first database system management mode being based upon the first database system management mode's ability to handle SQL queries having syntax and semantics according to the first flavor;

responding, by the database and in the first database system management mode, to the first SQL query to obtain first query response(s);

subsequent to the response to the first SQL query, receiving a second SQL query;

parsing the second SQL query to determine that syntax and semantics of the second SQL query correspond to a second flavor of a plurality of flavors;

re-setting the database to a second database system management mode, with a selection of the second database system management mode being based upon the second database system management mode's ability to handle SQL queries having syntax and semantics according to the second flavor, and with the second database system management mode being different than the first database system management mode; and

responding, by the database management system and in the second database system management mode, to the second SQL query to obtain second query response(s).

2. The method of claim 1 wherein responding to the first SQL query includes:

preparing the first SQL query through use of a PREPARE operation to obtain a prepared query.

3. The method of claim 2 wherein the prepared statement is a template statement into which database management system parameters are substituted.

4. The method of claim 1 wherein the database management system is a relational database management system (RDMS).

5. The method of claim 1 wherein responding to the second SQL query includes:

preparing the second SQL query through use of a PREPARE operation to obtain a second prepared query.

6. A computer program product (CPP) comprising:

a machine readable storage device; and

computer code stored on the machine readable storage device, with the computer code including instructions and data for causing a processor(s) set to perform operations including the following:

receiving a first structured query language (SQL) query,

parsing the first SQL query to determine that syntax and semantics of the first SQL query correspond to a first flavor of a plurality of flavors,

setting a database to a first database system management mode of a plurality of database system management modes, with a selection of the first database system management mode being based upon the first database system management mode's ability to handle SQL queries having syntax and semantics according to the first flavor,

responding, by the database and in the first database system management mode, to the first SQL query to obtain first query response(s),

subsequent to the response to the first SQL query, receiving a second SQL query,

parsing the second SQL query to determine that syntax and semantics of the second SQL query correspond to a second flavor of a plurality of flavors,

re-setting the database to a second database system management mode, with a selection of the second database system management mode being based upon the second database system management mode's ability to handle SQL queries having syntax and semantics according to the second flavor, and with the second database system management mode being different than the first database system management mode, and

responding, by the database management system and in the second database system management mode, to the second SQL query to obtain second query response(s).

7. The CPP of claim 6 wherein responding to the first SQL query includes:

preparing the first SQL query through use of a PREPARE operation to obtain a prepared query.

8. The CPP of claim 7 wherein the prepared statement is a template statement into which database management system parameters are substituted.

9. The CPP of claim 6 wherein the database management system is a relational database management system (RDMS).

10. The CPP of claim 6 wherein responding to the second SQL query includes:

preparing the second SQL query through use of a PREPARE operation to obtain a second prepared query.

11. A computer system (CS) comprising:

a processor(s) set;

a machine readable storage device; and

computer code stored on the machine readable storage device, with the computer code including instructions and data for causing the processor(s) set to perform operations including the following:

receiving a first structured query language (SQL) query,

parsing the first SQL query to determine that syntax and semantics of the first SQL query correspond to a first flavor of a plurality of flavors,

setting a database to a first database system management mode of a plurality of database system management modes, with a selection of the first database system management mode being based upon the first database system management mode's ability to handle SQL queries having syntax and semantics according to the first flavor,

responding, by the database and in the first database system management mode, to the first SQL query to obtain first query response(s),

subsequent to the response to the first SQL query, receiving a second SQL query,

parsing the second SQL query to determine that syntax and semantics of the second SQL query correspond to a second flavor of a plurality of flavors,

re-setting the database to a second database system management mode, with a selection of the second database system management mode being based upon the second database system management mode's ability to handle SQL queries having syntax and semantics according to the second flavor, and with the second database system management mode being different than the first database system management mode, and

responding, by the database management system and in the second database system management mode, to the second SQL query to obtain second query response(s).

12. The CS of claim 11 wherein responding to the first SQL query includes:

preparing the first SQL query through use of a PREPARE operation to obtain a prepared query.

13. The CS of claim 12 wherein the prepared statement is a template statement into which database management system parameters are substituted.

14. The CS of claim 11 wherein the database management system is a relational database management system (RDMS).

15. The CS of claim 11 wherein responding to the second SQL query includes:

preparing the second SQL query through use of a PREPARE operation to obtain a second prepared query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 12, 2016
From: KASS, ERIC
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 039426/0502 →
Priority Claims (1)
GB 1517732.2 · Oct 7, 2015 · national
Continuity (1)
Related Publication 20170103106A1 · Apr 13, 2017