This project started with my early experiments on the Oracle Call Interface back in 1994. Before that I had worked with C++ and several database APIs in different platforms. The idea was relatively obvious: SQL as a query language is based on the concept of data sets. The process of retrieving data from and writing it to the database can be naturally expressed as data streams. C++ had a concept of streams applied to files.
It was logical to combine the C++ streams and SQL as a language with data streams. It still remains a mistery to me why that thought did not occur to anybody else. Besides the idea itself, a good implementation was needed. It took me a while to realize that the simplest and most efficient implementation would be via C++ templates.
I went through a few intermediate implementations that used conventional object oriented techniques like creating a class hierarchy with inheritance and making an object library out of the source code. Some folks might have used it. It is known as the Oracle SQL Class Library (OSCL). It was released in late 1995 / early 1996 time frame. At the time, I was working on H1B visa as a technical consultant in a small "body shop" called Mosakin Corp. That is why the OSCL was stored in Mosakin's Web site as the "original product of the company." It seems that Mosakin has changed its general direction of business and the OSCL is no longer available in the Web site.
The first real template version of the OTL (OTL 1.0) was made on top for the Oracle Call Interface 7.x for Oracle 7 and it was released in late 1996 / early 1997.
Around mid-1998 I received a lot of questions and requests from different folks who kept asking me about the OTL for the Oracle Call Interface 8. The framework of the OTL 1.0 was enchanced a little bit and migrated to the OCI8. It became the second version of the OTL (OTL 2.0). This is the version that is being used by the developer community. OTL 2.0 is available for the OCI7 and OCI8 in separate header files. I keep supporting it for now.
In late 1998, I realized that the OTL framework could be migrated to the ODBC API. That is how the Odbc Template Library came along.
Basically, all three OTL's (OTL/OCI7, OTL/OCI8 and OTL ODBC) were similar in the core but they were based on quite different API's. Each OTL was around 150Kb of source code, so the combined code was around 500Kb. The next logical step was to try to come up with a unified template stream framework. I created the unified framework and also developed so called OTL-adaptors for the OCI7, OCI8 and ODBC.
The framework is truly template. The OTL-adaptors are just wrappers around the API's, low level classes. The actual OTL classes are instances of the template classes instantiated from the framework and the OTL-adaptors. The adaptor classes are substituted as parameters into the framework.
I am pleased to introduce the [unified] Oracle and Odbc Template Library (Version 3.1) to the developer community. It has enchanced functionality (e.g. support of the Large Object datatypes) and improved performance. In this kind of technology there is a potential to extend it even further to accomodate more databases. In fact, I tried the OTL 3.1 with DB2 5.2 and it worked because the native DB2 API is ODBC compatible with extensions.
Sergei Kuchin
Copyright © 1996, 2001, Sergei Kuchin, email: [email protected], [email protected] .
Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies.