Driver and method for processing a database statement
AssigneeOracle International Corporation
InventorsSunil Kunisetty, Prabha Krishna
Life of this patent
Estimating the term…
Abstract
A method and software for processing a database statement submitted by a client application to a database system is described. A database statement is precompiled based on a string received from the client application and cached in response to a call from the client application to close the precompiled database statement. The caching may be implicit or explicit or a combination of both. With implicit caching, the precompiled statement is saved in a cache in association with the string used to precompile the database statement; with explicit caching, the precompiled statement is saved in a cache in association with a user specified key.
Claims16
A computer-implemented method for processing a database statement submitted by a client application to a database system, comprising:
- precompiling a database statement based on a string received from the client application;
- and
- caching the precompiled database statement in response to a call from the client application to close the precompiled database statement;
- caching the string used to precompile the precompiled database statement in association with the cached precompiled database statement;
- and
- in response to a call from the client application to precompile another database statement based upon another string, performing the steps of:
- checking whether the string associated with the cached precompiled database statement matches the other string;
- if the string associated with the cached precompiled database statement matches the other string, then establishing the cached precompiled database statement as a result of precompiling the other database statement based upon the other string;
- and
- if the string associated with the cached precompiled database statement does not match the other string, then precompiling the other database statement based on the other string.
A computer-implemented method of processing a database statement in a driver for interfacing calls received from a client application and submitted to a database system, comprising:
- allocating a cache in association with a connection to the database system;
- in response to a call from the client application to close a prepared database statement, storing the prepared database statement in the cache;
- storing a string used to prepare the prepared database statement in the cache in association with the prepared database statement stored in the cache;
- and
- in response to a call from the client application to prepare another database statement based upon another string, performing the steps of:
- checking whether the string associated with the prepared database statement stored in the cache matches the other string;
- if the string associated with the prepared database statement stored in the cache matches the other string, then establishing the prepared database statement stored in the cache as a result of preparing the other database statement based upon the other string;
- and
- if the string associated with the prepared database statement stored in the cache does not match the other string, then preparing the other database statement based on the other string.
A computer-implemented method for processing a database statement submitted by a client application for a database system, comprising:
- allocating a cache in association with a connection to the database system;
- parsing the database statement based on a string received from the client application to generate a cursor and metadata;
- in response to a call from the client application to close the database statement, storing the cursor and metadata in the cache in association with the string;
- storing the string used to generate the cursor and metadata in the cache in association with the cursor and metadata;
- and
- in response to a call from the client application to parse another database statement based upon another string, performing the steps of:
- checking whether the string associated with the cursor and metadata stored in the cache matches the other string;
- if the string associated with the cursor and metadata stored in the cache matches the other string, then establishing the cursor and metadata stored in the cache as a result of parsing the other database statement based upon the other string;
- and
- if the string associated with the cursor and metadata stored in the cache does not match the other string, then parsing the other database statement based on the other string.
Dependencies are inferred from the claim text.