Will customization through software objects known as data cartridges give resellers a reason to use Oracle8?
Alan Joch
Relational database management systems (RDBMSes), the buttoned-up workhorses of corporate data management, are starting to chill out. After years of handling only highly structured alphanumeric information, these masters of predictability are beginning to incorporate audio, video, images, and other complex data types that Web, financial, and insurance applications use regularly. How do resellers get these two right-brain/left-brain worlds to mesh without months of custom coding? One answer: the new hooks that RDBMS vendors are build
ing into their architectures to accept custom software objects. These objects can teach database servers new tricks.
The promise for resellers is custom applications for their largest and most sophisticated clients. These applications can be built from new software objects that resellers themselves create or else purchase from other developers. Time will tell if the concept is sound. The first commercial technology for extending RDBMSes to handle complex data arrived se
veral years ago with Illustra's DataBlades, now part of Informix Universal Server. Other RDBMS vendors, including Sybase and IBM, have announced similar tools for their databases.
However, one of the most influential implementations of RDBMS extensions is Oracle's technology, known as data cartridges, which began shipping last June with Oracle8. Data cartridges are noteworthy because of Oracle's market dominance. Also, new tools are on the way, including a software development kit designed to help V
ARs and systems integrators create custom cartridges for their clients; this kit is due out in early 1998. BYTE obtained an advance copy of the SDK, which provides step-by-step instructions for creating data cartridges within the Oracle8 framework. When demand for complex data becomes more common, will Oracle8 be the right platform? To help you decide if Oracle's approach for meshing complex data with an RDBMS is on target, here's a look at the basic foundation of a cartridge built with SQL and C/C++.
Slow Start
For the most part, only pioneering resellers have taken advantage of these object extensions since Oracle8 began shipping.
Data cartridge customization and development isn't necessarily difficult -- the process is relatively straightforward for resellers versed in SQL or C/C++ programming. Cartridge development hasn't become mainstream primarily because demand for it so far has come only from people who need niche solutions.
One reason Oracle8 hasn't caught fire is resellers
are still completing a significant number of database projects using previous versions of the product. "We've had hardly any bites yet for Oracle8," says
Lance McGonigal
, vice president of information services for ESI Group (Little Rock, AK), a VAR that specializes in Oracle jobs for state government systems and healthcare imaging systems. "Oracle8 has a truckload of new features, but a lot of people are still struggling with Oracle7.3," he adds.
What will it take for Oracle8 to become hot? In McGonigal's view, the keys are mature Java connectivity and desktop development tools that will help resellers speed creation of database/Web applications. "JDBC [Java Database Connectivity] drivers," in particular, he says, "are really up in the air."
According to Oracle, VARs that report Oracle8 demand so far are those that specialize in imaging, geospatial, and high-volume transaction processing applications. A good example is Virage (San Mateo, CA), a reseller that has created cart
ridges for pattern recognition of images, says Jim Steiner, Oracle's senior director of server technology. Another example is a Canadian office of MCI Systemhouse, an international systems integrator; it developed cartridges to customize a large-scale transaction processing system for telecommunications companies.
Cartridge Encouragement
In part to encourage early cartridge development like the preceding two examples, Oracle built and is shipping a handful of basic data cartridges. These cartridges define and integrate complex data types within the Oracle8 data server, explains Sandeepan Banerjee, Oracle's senior product manager for languages and relational methodology.
Oracle cartridges
, which can be customized by resellers, include the ConText Cartridge, which uses SQL
to blend
structured and unstructured data. The Image Cartridge helps end users quickly retrieve images in multiple formats from corporate databases. The cartridge stores images
in a variety of compression formats and supports on-the-fly compression and decompression. The Visual Information Retrieval Cartridge helps end users search for images in large repositories. The Time Series Data Cartridge manages historical data (including opening, high, low, and closing prices) in financial applications. Video Cartridge helps companies store, manage, and deliver full-motion video for electronic product catalogs, point-of-sale kiosks, and corporate training programs.
The fundamental task of a data cartridge is to store attribute data and methods for each complex data type. Typically, the database server handles processing chores for data cartridges, either directly or by converting calls into external procedures.
However, resellers aren't confined to creating cartridges that plug in only to the database server; a browser or application server can also host cartridges, which may be written in a variety of languages, including Java, Visual Basic, C/C++, and Oracle's own PL/SQL. Cart
ridges can communicate via Common Object Request Broker Architecture (CORBA) and HTTP, Banerjee says. By early next year, Oracle plans to ship cartridge interfaces for memory management, error handling, event handling, context management, internationalization, cartridge-specific metadata management, and administrative services, he adds. Interfaces such as these will help the Oracle server process new data types. Banerjee says these helper routines can ease the work of VARs and other developers when writing portable server-side methods.
VARs can create data cartridges with a seven-step process, using a variety of tools ranging from Microsoft Visual C++ and Visual Basic to Oracle PowerObjects to Powersoft PowerBuilder. Note that slight procedural changes occur depending on if you develop a cartridge in SQL or use C/C++ or another 3GL language. The primary difference is you need to wrap 3GL code in a dynamic link library. Banerjee uses code for two "Hello World" examples to show the rudimentary steps in cr
eating a data cartridge and to demonstrate how the SQL and the C/C++ development processes differ. You can see complete code for these two examples at the BYTE Site (
http://www.byte.com/download/download.htm
).
The Process
Step 1: Task Definition.
This is essential no matter what language you use to create a cartridge. Developers begin by delineating what features the new cartridge will provide for end users. It's also important for cartridge developers to take time to describe the kinds of objects the cartridge will use.
Step 2:
Define Data Attributes and Methods. Next, VARs create the object type (see ORDHelloWorld in Section 2 of the first "Hello World" sample code). For this example, the definition consists of a variable called
m_language
, an integer
to hold a number that represents the language for a particular instance of this object to work on, two strings (m_englishw and m_spanishw) to hold two predefined "Hello World" strings (one in each language), and the prototype definitions for all methods for this object (mpSetLang and mfSay-Hello).
Step 3:
Define the Interface. Here, resellers that use C/C++ follow a slightly different cartridge development path than SQL programmers. The former must package any existing C/C++ (or other 3GL code) into a DLL. This code, which performs custom operations for each individual cartridge, runs in a separate address space and process from the database engine, which helps prevent any cartridge failures from bringing down the database engine, according to Banerjee. The Oracle Call Interface (OCI) handles communications between the database engine and the data cartridge.
Developers next need to hone the interface between the SQL side of object methods and any existing 3GL code that's part of the applic
ation. Banerjee recommends keeping the interface simple by limiting the number of methods that call out to library routines and by allowing the 3GL code to do a block of work independently. Avoid defining hundreds of calls into low-level library entry points, he says. Developers must define the path to and the file name of the DLL. This establishes the logical name (ORDHelloWorldLib, for example) for this library, and the name is used throughout the subsequent SQL code.
Step 4:
Specify Object Types. Developers create object type specifications and the SQL components of the object's method code. You may write methods entirely in SQL or instruct methods to call an external library. If using an external library, you must link the library definition and the detailed bindings to library entry routines.
Step 5:
Create Method Code. This, the actual code for the object's methods, may be written in SQL when there are no calls to external C DLLs. In the "Hello World" example built with SQL, th
e first routine (mpSetLang) takes the integer value of a language (passed in) and assigns it to the object's data element m_language. The second routine (mfSayHello) uses a set of if-then-else-like statements to return the "Hello World" string in the appropriate language, Banerjee explains. In this example, 0 specifies English, 1 specifies Spanish, and any other value generates a warning message.
For C/C++ development (see Section 3, ORDHelloWorld, in the 3GL code sample), the language-specific "Hello World" strings are not in the data elements of the type. Instead, these strings will be generated using the "translate" technology, Banerjee says.
Step 6:
Write a Test Sample. The test program uses externally visible object definitions. You can use the program for debugging and as instructional code for future users of the data cartridge.
Step 7:
Installation. Plugging the tested cartridge into the database server happens by defining object types and tables in the server (usually
by running SQL scripts), adding any necessary DLLs, and copying on-line documentation, help files, and error message files to a central location.
Telling the server about the object types involves running SQL scripts that load the individual object types defined by the cartridge. This step must be done from a privileged account, Banerjee says.
Next Step
In the future, Oracle expects to expand its data cartridge architecture with additional cartridge interfaces. The company also plans to release tools, like the upcoming SDK, that will enable VARs and commercial developers to come up with new data cartridges.
But before data cartridges can become ubiquitous, Oracle sales must grow. Oracle can encourage that growth among resellers not with new technology but with strong technical support and solutions for the crankiness that still exists between the RDBMS and NT, says Oracle VAR McGonigal.
"The first Oracle8 customers will be ones who already have mature Oracle applications. A l
ot of folks got caught up in the client/server boom and thought they could port Oracle to a client/server architecture and it would be cheaper. Then they found out they needed more horsepower to make up for the mainframe they replaced. So what we're seeing now is a lot of confusion among customers," McGonigal says. "We mainly see Oracle and SQL running on NT, front-ended with Access or Visual Basic. NT is where we see the biggest problems, probably because there is not a lot of history with Oracle on NT."
Where to Find
Oracle Corporation
Redwood Shores, CA
Phone: 415-506-7000
Fax: 415-506-7200
Internet:
http://www.oracle.com
Information on products in the
data management
category
HotBYTEs
- information on products covered or advertised in BYTE
illustration_link (12 Kbytes)

Oracle8's data cartridges are software components for creating applications that blend unstructured data with RDBMSes.
illustration_link (10 Kbytes)

Oracle8 resellers can "plug in" custom features, like a proprietary image search engine, via a data cartridge.
photo_link (78 Kbytes)

"Oracle8 has a truckload of new features, but a lot of people are still struggling with Oracle7.3." -- Lance McGonigal
Alan Joch is a freelance writer and former BYTE senior editor who covers emerging technologies. You can reach him at
ajoch@monad.net
.