Browse Prior Art Database

Use of Structured Query Language Packages for Supporting Extended Dynamic Structured Query Language

IP.com Disclosure Number: IPCOM000117397D
Original Publication Date: 1996-Feb-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 98K

Publishing Venue

IBM

Related People

Megerian, MG: AUTHOR

Abstract

A technique for storing Structured Query Language (SQL) statements is disclosed. An object called a package is used as a repository for SQL statements. This allows SQL statements to be reused, and results in improved performance of products using SQL.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Use of Structured Query Language Packages for Supporting Extended
Dynamic Structured Query Language

      A technique for storing Structured Query Language (SQL)
statements is disclosed.  An object called a package is used as a
repository for SQL statements.  This allows SQL statements to be
reused, and results in improved performance of products using SQL.

      Structured Query Language (SQL) is the most common database
access language.  Quite simply, SQL is the ONLY way to access
database in an open, heterogeneous environment.  SQL is considered by
some to be a 4th generation language.  This means that the syntax of
an SQL statement is such that the user knows what they want, but they
don't know exactly how to get it.  That means that the runtime SQL
processing needs to parse the SQL statement, determine how to fulfill
the request, and store all of this information in an "access plan".
The parsing of the statement and building of the access plan can be a
relatively long and complicated process.  Users that want SQL in
their programs get around this problem because the parsing and the
building of the access plan are performed when the program is
compiled.  This is made possible by the fact that the SQL statements
are embedded in the source code and can be processed by an SQL
precompiler.  When running the program, the access plans are already
built and stored in the program object and can be used to fulfill the
request as quickly as possible.

      Another common usage is for users that want to create ad hoc
SQL requests.  They are at a computer workstation and want to look at
data using SQL requests, but they do not know in advance what these
requests will be.  For example, an executive wants to see the top 10
salespeople for a certain division.  This can be easily accomplished
with an SQL "SELECT" statement.  But if that statement was never
stored in a program somewhere, it will have to be parsed and have an
access plan built before it can even begin executing.  This
processing can cause quite a delay before the request can be
fulfilled.  This is known as dynamic SQL.  What is worse is that even
if the same executive wanted to execute that same request every day,
it would always perform poorly since it would never be saved
anywhere.

      This disclosure is for allowing SQL statements that are used
once to be saved and reused later.  The basic technique is to give
the user the ability to create a repository for SQL statements.  This
repository is known as an SQL package.  This disclosure does...