Re: Oracle Class library

From: Mike Wood <maw_at_iac.net>
Date: 2 Apr 1994 20:23:07 -0500
Message-ID: <2nl5pr$cgj_at_great-miami.iac.net>


Martin writes...
>Does anybody somewhere have an interesting experience with C++ an Oracle?
>
>Is there any encapsulated Oracle Calls Interface "C" calls in a class
>library somewhere?
>
>Or is those Oracle CASE tools the better way to develop apps and maintain
>users happy?

I have developed a class library that goes one step beyond encapsulating the Oracle OCI. I have classes that allow you to connect to a deamon that I wrote that process all of the OCI apis for you.

I call this the Dbfe suite. It consists of the following items:

  • dbfed - database front end deamon. This process runs on each machine in your network that has database instances running on it. It provides the database vendor specific connection to your RDBMS. I have implemented an Oracle version based on the OCI api. This program forks a copy of himself for each connection request that the client objects request. It provides socket based connections that allow you to have clients connecting to databases without the use of SQL*Net.
  • Dbfe C api. A k&r / ANSI 'C' interface to the dbfed process.
  • Dbfe class. A C++ class the provides an OO connection to a dbfed process. It has methods like: commit, rollback, connect, disconnect.
  • Query class. A C++ class that provides query level processing. It is through this class that you process SQL via dbfed. I tend to use this as an abstract class that is derived for each query.
  • FetchFrame class. A C++ class that provides a row/column api to data returned from Query::fetch.

Contributory clients that use dbfed via the apis:

  • os : A shell like SQL interpreter. This process works hand in hand with awk and perl to process SQL from a shell. It makes use of the C preprocessor to allow you to create common SQL macros.
  • goose : A Motif based adaption of os that allows you to browse the data dictionary and process SQL at the same time. This client demonstrates the non-blocking mechanics of the Dbfe API's.

I am currently finishing up goose and protecting the code under the GNU license. I am considering adding a significant amount of effort to the communication aspects of Dbfe that will rely on Rogue Waves tools.h. I hope to make replace the FetchFrame class with items derived from RWCollectable. This will make the code less portable, but much more robust.

If you are interested drop me a note. I would be glad to post or send the code to you.

Michael A. Wood
maw_at_iac.net Received on Sun Apr 03 1994 - 03:23:07 CEST

Original text of this message