Browse Prior Art Database

Synchronous Method for Allowing Single Process Applications to Use Concurrent Database Connections

IP.com Disclosure Number: IPCOM000106204D
Original Publication Date: 1993-Oct-01
Included in the Prior Art Database: 2005-Mar-20
Document File: 2 page(s) / 94K

Publishing Venue

IBM

Related People

Edwards, W: AUTHOR [+3]

Abstract

This invention provides a basic scheme that can be used by multithreaded database application programs to exploit the concurrent database connection support added to a Database Manager (DBM) through the method described in invention: "A method for supporting multiple concurrent database connections within a DBM application process". This method includes the means by which a multithreaded application process can concurrently make a request on multiple database connections. A sample design for implementing this method in the OS/2* DBM is also included. Both, the method and the design are described in detail in the paragraphs that follow.

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

Synchronous Method for Allowing Single Process Applications to Use Concurrent Database Connections

      This invention provides a basic scheme that can be used by
multithreaded database application programs to exploit the concurrent
database connection support added to a Database Manager (DBM) through
the method described in invention: "A method for supporting multiple
concurrent database connections within a DBM application process".
This method includes the means by which a multithreaded application
process can concurrently make a request on multiple database
connections.  A sample design for implementing this method in the
OS/2* DBM is also included.  Both, the method and the design are
described in detail in the paragraphs that follow.

     The key idea in this method is the mapping of threads to
database connections.  A thread is assigned to each database
connection.  Then, each thread can make synchronous database requests
on its connection.

     Declaration of connection handle host variable.  Use new
embedded SQL statement to declare a database connection handle host
variable.  The embedded SQL (precompiler) statement shown below is to
be used by an application program prior to any other SQL statement in
the embedded SQL program module.  The variable (<hostvar_name>)
declared with this state- ment must be defined using the BEGIN and
END DECLARE SECTION embedded statements, and it must be of type (void
*) or (char *).

     EXEC SQL DECLARE DATABASE HANDLE VARIABLE :<hostvar_name>

     Each thread in the process must call the sqledbat() function
prior to making an SQL request and it must do so using the address of
the database connection handle host variable as the value of the
dbhandle_var parameter.  The value of the waitflag parameter must be
set to TRUE so that SQL requests are synchronous.

     A design for supporting a synchronous method for allowing single
process applications to use concurrent database connections is
described next.  In addition to the design used for supporting the
method by which single process applications may use concurrent
database connections with serialized threads or with no threads, the
support of requests on concurrent database co...