Chapter 17

Commercial Applications


CONTENTS

This chapter introduces dynamic Web integration with various data sources. An organizational Intranet is no more static. It has to integrate with the departmental and organizational data-and the data is changing constantly.

All the major players such as Microsoft, Oracle, Informix, and so on have tools to publish data from their client/server database systems. In the client/server world, Oracle is the most popular database. Oracle is in the forefront of Intranet applications and has a superior Internet strategy covering small to large institutional databases. Microsoft Backoffice and their SQL server database is growing in its popularity especially with its close integration with Windows NT and the Internet Information Server. Illustra, now part of Informix, has some innovative products. We can say that they are pioneering object-based relational databases, which are the main focus in this chapter. As we cover the data integration, we will touch upon some of the related tools from these vendors.

Lastly, this chapter discusses the database access from the Java language and covers the JDBC the database access classes that are a part of the Java language in some detail. The JDBC is important from a client/server perspective to develop custom 3-tier or n-tier applet-based applications.

In this chapter, you will learn about:

Microsoft BackOffice

Microsoft BackOffice product is the enterprise level solution from Microsoft that includes components from a database to a proxy server. The current BackOffice version is 2.0 with Windows NT 3.51, which will be soon replaced by Windows NT 4.0 and IIS 2.0. Microsoft has already a proxy server code named Catapult and an Index server code named Tripoli in beta, which will become part of the BackOffice suite. It is informative to take a look at the last couple of versions of BackOffice as outlined in Table 17.1. to see the progression of the various products and the influence of the Intranet.

Table 17.1  Microsoft BackOffice Versions
Version Messaging DatabaseInternet Other Components
1.5Mail Server 3.51 SQL Server 6.0NA (Can down download IIS from WWW) SNA Server 2.11, Systems Management Server 1.0
2.0Exchange 4.0SQL Server 6.5 IIS 1.0cSNA Server 2.11, Systems Management Server 1.1
Future (4 to 6 months)Exchange 4.0 built-in SQL Server 6.5NT 4.0 with IIS 2.0 SNA Server (Internet access/Middleware component) Systems Management Server (Updated to allow over the Internet)

Catapult Proxy server

Tripoli Index Server

BackOffice Integration with WWW

The Microsoft BackOffice is an integrated solution for enterprise on the Windows NT platform. With the increasing popularity of the Intranet as the basis for corporate information systems, the BackOffice suite is becoming an integrated Intranet system. Let us look at some of these integration features from various points of view.

First and foremost is that all the components share the Windows NT security system. In a multi-server, multi-location enterprise, the BackOffice provides a single sign-on facility. Domains, trusts, users, and groups are part of the NT security system. Users can login from any workstation including anywhere on the Intranet and have a secure access to resources. They do not have to logon many times with different passwords and usernames. As explained in Chapter 5 users can use FTP and WWW services with their username/password combination. This suite also provides the encrypted username/password security as well as SSL support for the WWW/http protocol.

The second integration is in the administration and monitoring areas. The BackOffice components from the SQL server to the IIS share the Windows NT logging and alert subsystem as well as the performance monitoring subsystem. The Windows NT server runs and manages the applications and services; and, the administration and monitoring tools available in NT provide global functionality across all the BackOffice components.

Looking at data integration, of all the BackOffice components, the IIS and the SQL server are closely integrated on the data sharing level. As the products evolve, Microsoft is adding more and more data level integration between the IIS and SQL server.

The SQL server can be accessed directly from the corporate Intranet using the standard development tools (such as Visual J++, Visual Basic, C++, and Delphi) using ISQL/Transact-SQL and also client applications based on ODBC or DB-Library. The SQL server uses TCP/IP protocol and also the Multi-Protocol Network Library called netlib, which establishes encrypted connections over the Intranet with users and servers. Figure 17.1 shows how to install the network protocol support for the SQL server.

Figure 17.1 : SQL server multi-protocol network setup.

Other than the traditional full-fledged client/server development using the SQL library interfaces, there are three major interfaces to the Web through IIS: IDC, dbWeb, and the SQL Web Assistant.

As we have seen earlier, the ISAPI allows you to write DLLs for the Internet Information Server. The Internet Database Connector Driver is an ISAPI program that handles ODBC data sources.

DbWeb is a point-and-shoot interface for publishing databases.

The SQL server has the Web assistant that can publish data to the Web. Actually, this can be used with any Web server. The following sections give an overview about these strategies.

Internet Database Connector

The Internet Database Connector allows the publishing of ODBC compliant databases on the Intranet/Internet. This means, with the IDC you can publish data in SQL Server, Access, ORACLE, Informix, SYBASE, and other ODBC-compliant databases. Microsoft positions IDC as a developer technology that serves as a foundation for developing custom database applications with IIS. Basically, it provides a way to use SQL statements through ODBC drivers and connect the results to a Web page.

The Internet data connector is an ISAPI DLL named httpodbc.dll. It converses with the Web browsers through the IIS with the http protocol and with the databases on the backend using the ODBC. The steps are as follows:

  1. Create an Internet data connector file-with .IDC extension-on the IIS server. This file is a text file that specifies an ODBC data source and login information, as well as queries programmed in SQL to retrieve and/or update data.
  2. Create an HTML extension file-with .HTX extension-on the IIS server. This file also is a text file that acts as a formatting template for any retrieved results. The IDC file references the .HTX file so that the database information can be formatted to display in an HTML page.
  3. Now create the Web page that passes a reference to a specific .IDC file in order to connect to and access the database from a Web browser. The Web page (HTML document) can include a form so that users can enter search or update information that will be used by the IDC file when executing the SQL statements. If results are returned, they are returned in an HTML page that is formatted based on the rules set up in the .HTX file.

Using Internet Database Connector

The HTML Web page document has the HREF link filled with the .idc file name. For example,

<A HREF="http://www.astrix.com/samples/sample1.idc">Sample IDC</A>

As .idc extension is associated with httpodbc.dll, the .idc file is passed to the httpodbc.dll. This .idc file has ODBC data source details including username, password and data source name, the .htx template file name, and the SQL query at minimum.

TIP
There are many more fields possible in the .idc file. Please refer to the IIS product documentation for the .idc field details.

The httpodbc.dll issues the ODBC query/statement. The result is then formatted using the .htx file as the template. The now HTML-formatted ODBC result is sent to the IIS and the IIS sends the HTML document to the client. The IDC is capable of creating interactive forms that can create, modify, and delete SQL data.

SQL Server Web Assistant

The SQL Server Web Assistant is positioned as a tool to publishing SQL server data in the HTML format. The main distinction is that this is a non-interactive process. That is the IDC uses the ISAPI gateway to "pull" data from the SQL server. The Web Assistant uses the "push" method to deliver data. It updates the Web page as scheduled by the configuration.

The Web Assistant can handle Transact-SQL queries, stored procedures, and extended stored procedures. On a functional level, the Web assistant is an interface to a stored procedure named sp_makewebtask. The HTML Web page file can be updated whenever relevant data changes (by using a trigger) or updated at scheduled intervals (by using the SQL Enterprise Manager scheduling).

dbWeb

The Microsoft dbWeb is implemented through ISAPI DLLs. In that respect, it is similar to IDC. The difference is that dbWeb is an end-user tool with a graphical, point-and-click, query-by-example (QBE) interface. Similar to IDC, dbWeb connects the Web to ODBC data sources. The dbWeb runs on a Windows NT server and requires IIS and ODBC 2.5 drivers for the database you want to publish.

The dbWeb is a very flexible product and is not limited to only Microsoft databases. It can connect to any data source that supports 32-bit ODBC, and so dbWeb can be used on all the major databases including Oracle, Sybase, and Microsoft Access in addition to SQL server. Even Lotus Notes has an ODBC driver! And dbWeb supports dynamic data queries and basic row manipulation which means you cannot only publish data but can manipulate (create, update, and delete) that data, too.

Installing dbWeb

As of now, dbWeb is a downloadable product and is free from Microsoft. Download a copy (the file is named dbweb11.exe and is about 7.7 MB) from www.microsoft.com/intdev/dbweb. The current version is 1.1.

NOTE
The dbWeb was developed by Aspect Software Engineering Inc., and the company was taken over by Microsoft.

Run the dbweb11.exe to install the dbWeb. Figure 17.2 shows the installation screen with component options. If you want to install only certain components, the choice can be made here. Figure 17.3 shows the directory options window for WWW publishing of the data through dbweb.

Figure 17.2 : dbWeb installation shows the selection screen for the components to install.

Figure 17.3 : dbWeb Installation-II. Shows the directories for WWW publishing of data through dbWeb.

Using dbWeb

The dbWeb consists of two components-the dbWeb service and the dbWeb administrator.

The dbWeb service runs as a 32-bit multithreaded NT service. The functionality includes processing data retrieval requests and formatting and displaying the results. The results are displayed based on the configurations done using the dbWeb administrator. The data display including the query fields, the actions permitted (insert, delete, or update records), and so on, can be controlled.

The dbWeb service gets the user requests from the WWW browser, communicates with the ODBC data source, and returns the results to the IIS which, in turn, send to the client browser.

The dbWeb administrator is a very powerful GUI front-end for configuring the system. It uses schema to control how the database information is published on the Intranet. Schema defines the query and resulting HTML pages that are displayed on the Web.

The main advantage of dbWeb is that no HTML or ISAPI programming knowledge is necessary to create the dbWeb schema. The dbWeb administrator provides an interactive Schema Wizard for this purpose. Figures 17.4 and 17.5 show two representative dbWeb Administrator screens.

Figure 17.4 : The dbWeb Administrator Schema shows the configuration for a table to be published.

Figure 17.5 : The dbWeb Administrator QBE.

The following list summarizes the main capabilities of dbWeb administrator:

Oracle Universal Server and Web System

Oracle is the most widely used RDBMS and as we all know the company is committed to the Web in more than one way. From the less expensive Network Computers to the multi-site transaction processing applications, Oracle has solutions either in place or in development. We describe a few of them in this section and, as is the true nature of the Web, by the time you read this, Oracle will have released more tools and ideas!

Oracle's solution for the WWW and for Intranets is the Oracle WebSystem which is a part of the Oracle Universal Server. Oracle specs Universal Server as a complete solution for managing any data-relational, spatial, text, image, video, and audio-in any application, at any scale.

Oracle's flagship database server coupled with SQLNet and secure network services (now Advanced Networking Option) enable one to leverage the power of networked databases. When integrated with the Oracle Webserver, the Oracle servers become a powerful World Wide Web server with the potential for enabling a whole new generation of Web applications. Oracle's features include scalability, industrial strength, mission-critical applications support, and security.

Universal Server-Components

The Oracle Universal Server Suite consists of an Oracle Database server, interoffice Message Server, and the WebServer. (The Oracle RDBMS server comes in three flavors-Personal Oracle7, Oracle7 Workgroup Server, and the Enterprise Oracle7.) There are also components such as File and Print Manager for Windows Clients, Operating System Manager for remote monitoring and server management, User Manager to add, modify, delete users, and Backup Manager for remote backup and restore services, and some optional CPU-specific components.

Client Components

The client components provide the functions necessary to access information from the clients. They include Toolbar with Secure Single Login, InterOffice Client for messaging, Oracle PowerBrowser, Objects for OLE, and ODBC Drivers.

Oracle PowerBrowser is a WWW browser that supports Java, JavaScript, Oracle BASIC script, version 2.0 of HTML, and all the major extensions to HTML, including frames, HTML 3.0 tables, and backgrounds.

The ODBC drivers can be used in conjunction with Microsoft IIS IDC and dbWeb for interactive publishing of data in Oracle databases. Also the ODBC drivers can be used with JDBC for connecting with Java applets.

Hardware and Software Requirements

The following table gives a general idea of the requirements for the server, manager, and client components. You can use the following table as an estimate. Please refer to Oracle Web site as well as spec sheets for the latest requirements.

ServerInitially be available on Solaris-Intel and Microsoft Windows NT. The recommended configuration is an Intel-based machine with a 100MHz Pentium processor, 64MB RAM, and 2GB of disk space.
Oracle Enterprise Manager Suite PackMicrosoft Windows NT and graphical environment with 32 MB of RAM and 1 GB of disk space.
Client Microsoft Windows 95 or Microsoft Windows NT graphical environment with 16 MB of RAM and 500 MB of disk space.
Toolbar, secure single login, login,and local GUI administration tools Windows 3.11, Windows 95, or Windows NT. However, the InterOffice Server's Web client and Web-based local database administration tools may be accessed from any system with an HTML 2.0- compliant World Wide Web Browser.

In this section, our focus is on the Oracle WebSystem, which consists of the Web server and client products. The Oracle WebSystem is capable of reliably managing a high volume of online dynamic data.

The current Oracle WebSystem components are as follows. Bear in mind that the version numbers and operating systems almost surely will change by the time you read this chapter. You will find the latest information at the Oracle Web site at www.oracle.com.

Oracle WebServer 3.0Announced
Oracle WebServer 2.0SPARC Solaris 2.4
Oracle WebServer 1.0 Windows NT
Oracle WebServer Option 1.0For integration of earlier versions (7.1.6 or higher) of Oracle Databases
Oracle PowerBrowserAll supported OSs

The Oracle WebServer is included with Oracle7 Server Release 7.3. In the following section, we will cover the Oracle WebServer product in some detail.

The Oracle WebServer

The Oracle WebServer, integrates the Intranet to Oracle's database, enabling developers to build powerful dynamic Web applications with HTML pages reflecting current information from the database servers. The WebServer product went from version 1.0 to 2.0 to now 3.0 in a matter of six months. Let us look at the architecture and some of the tools available from Oracle.

Oracle WebServer 1.0

The WebServer 1.0 consisted of two components: the Oracle Web Listener and the Oracle Web Agent. The Oracle Web Listener/HTTP Listener is a process running on the Web Server computer supporting hundreds of concurrent users and is suitable for high-traffic and mission-critical applications on wide-area networks. It has file caching algorithms including asynchronous read-ahead and sharing between multiple connections. It supports CGI version 1.1. The Oracle Web Agent is a gateway that invokes Oracle stored procedures, passes parameters to the procedure, and provides an output mechanism for the result set. I agree with Oracle's statement that it provides an object-oriented, user-extensible framework for producing dynamic HTML pages using PL/SQL. The Web Agent enables users to dynamically pull information and post transactions into corporate databases from their Web browser.

Oracle WebServer 2.0

Oracle did a lot of improvement and redesigned the WebServer 1.0 to develop Web Server 2.0. This product is a robust, secure, and multithreaded architecture.

The WebServer 2.0 is centered around the Web Request Broker (WRB), the multithreaded, multi-process HTTP server. The Web Listener in 1.0 is enhanced to a high-performance Web Listener, which hands over the HTTP requests to the Web Request Broker. The WRB is a component-based extensible architecture. The extensions can be business logic or special processing or general purpose modules such as the Java Virtual Machine or credit card processing, and so on. In fact, one of the cartridges is the PL/SQL Agent (which is a high-performance replacement for the Web Agent in WebServer 1.0), which performs a two-way data communication with stored procedures in Oracle databases.

The WRB has dynamic load-balancing capabilities which are essential for large-scale applications. The WRB is supported by SDK for development and management tools for administration and performance monitoring.

Internally, the Web Listener is the front-end HTTP processor. It gets the incoming HTTP requests and delivers them to the Web Request Broker. The Web Request Broker has a WRB Dispatcher (WRBD). The WRBD has a registry of currently running object processes, which are encapsulated with callbacks to the WRB Execution Engines (WRBX), and routes the incoming requests to one of them.

NOTE
The object processes are developed using the WRB Software Development Kit. These object processes are called cartridges. The inter-cartridge API, which will be fully developed in WebServer 3.0, will enable the cartridge modules to communicate with one another.

Oracle has developed the PL/SQL agent as a cartridge. There are third party vendor cartridges such as the Verifone Virtual Point of Sale cartridge. Intranet developers can develop their own cartridges encapsulating business rules and common logic and connect them to the WRB.

Another important advancement in the cartridge development is the implementation of Java Virtual machine as a cartridge. So, now, any Java program can interact with other cartridges, thus enabling the developer to design and implement powerful Java applications. Oracle has extended the Java language by adding three packages: oracle.plsql.*, oracle.html.*, and oracle.rdbms.*. These packages add the oracle database access, dynamic HTML generation, and PL/SQL access functionalities to the Java language.

In the security area, it supports SHTTP and SSL. Also the advanced networking option features are extended to the Web. (The Advanced Networking option even gives fingerprinting security.) It also supports IP-based and domain-based restriction-which is a good feature for Intranets-and also Oracle Secure Network Services (SNS)-which gives capability for secure access across firewalls.

PowerBrowser

The PowerBrowser is the Oracle client-side Web browser. It also includes a Web server (called "personal server," which falls under the peer-to-peer Web server category), an integrated BASIC scripting environment, Java support, and Network Loadable Objects.

The BASIC scripting environment is similar to JavaScript and VBScript and follows the Oracle's Power Object's syntax. The Network Loadable Objects are similar to and compatible with Netscape plug-ins, which are third-party extensions.

The Advanced Networking Option

This option is very important from a security point of view. This component provides single sign-on services, network encryption and user authentication, and OSF DCE integration for Oracle databases. The Oracle spec sheet characterizes the SQLNet integrated with the advanced networking option as any protocol, any application, and any data capability.

Oracle7 Advanced Networking Option also provides technology for encrypting data traffic. This supports MD4/MD5 RSA digest algorithms and DES 40-bit key encryption. This supports token authentication and also biometric authentication. The biometric authentication uses fingerprints to authenticate users! This option can be integrated with the WebServer to provide secure access to corporate information. (Using fingerprints for an Intranet application inside a firewall would be too much security. But if you work with the CIA or have very sensitive data, it is worth it. Also, this feature could be used for access into buildings, and so on.)

One point of interest to Intranet practitioners is that in conjunction with third-party firewall vendors, the security can be extended to Web browsers outside the firewall.

Informix Illustra

Illustra is an Object-oriented database management system (ORDBMS) developed by Illustra Information Technologies, Inc., now merged with Informix. The Illustra products consist of a core database server, "snap-in" modules called DataBlade modules, and application development tools.

The radical concept is the DataBlade module-conceptually similar to objects in Java or C++-which is a collection of data structure definitions and methods or functions that manipulate the data plus new access methods to these objects. The aspect which makes this suited for the Web is that the architecture is extensible to media-rich objects like audio and video clips, time series, maps, text, images of various kinds like VRML, PDF, JPEG, GIF, or even data types that have yet to be invented! With Illustra's merger with Informix, these products will incorporate the object orientation with the transaction processing capability of Informix software.

We can predict the future direction of Illustra knowing that their mission statement is to enable businesses to manage any kind of information-including traditional, new, and future data types in a completely integrated system that best suits their particular needs.

The Illustra Object Relational Database Management Server

The Illustra Server is an object-oriented relational database. It handles a variety of data as data types with query, analysis, and intelligent selection capability.

The Illustra server supports traditional relational technologies including standard SQL, data integrity and security, and transaction processing including recovery and scalability. It adds the object technology to extend data types, access, display, and storage. The Illustra documents call this an object-relational concept-powerful enough to store and manipulate richly structured data and enforce the complex business rules that define its integrity, and flexible enough to handle novel data structures effectively.

The Illustra Server when combined with DataBlade modules adds unprecedented power to the relational model-extending the SQL query language to process rich data. It provides content-based queries, optimized query plans, and high-performance storage and retrieval tailored to any data type including new ones. The Illustra supports UNICODE for internationalization of the Web site. Table 17.2 lists the platforms and operating systems supported by the Illustra ORDBMS.

Table 17.2  Illustra-Supported Platforms
DEC AlphaOSF-1 3.0
HP 700/800HP/UX 10.x
IntelNT 3.5/3.51
Silicon GraphicsIRIX 5.2/5.3
SunSunOS 4.1.3
SunSolaris 2.3

NOTE
Many of the DataBlades from Illustra are not supported on all platforms and operating systems. I am sure they will port the DataBlades to other OSs. So check with the Illustra Web site for availability.

The DataBlade Concept

As described earlier, the DataBlades are extensible intelligent modules for a particular data type with data interpretation, storage, access, and possibly display capabilities. They can be viewed as "smart objects." For example, the time series DataBlade implements the time series as Data Type and extends the relational model to support repeating time-based data like financial, scientific, and so on. It supports storage, access, and modeling of time series data. Figure 17.6 shows the general modules in the Illustra ORDMBS design.

The following table (see Table 17.3) summarizes some of the most important DataBlades available. More details including white papers can be obtained from the Illustra Web page http://www.illustra.com.

Table 17.3  List of Illustra DataBlade Modules
Image DataBlade ModuleThe storage and manipulation of raster images. It includes functions that crop, scale, rotate, and otherwise manipulate images.
PLS DataBlade ModuleMechanisms to search, store, and manage text.
S-Plus DataBlade ModuleAdds support for over one thousand statistical functions to the Illustra Server. Example applications include Financial Risk Management, Modeling Equity Returns, Analysis of the Residual Returns of Stocks, and so on.
Sybase Gateway ModuleIntegrate data from a Sybase database with information stored within Illustra.
Text DataBlade ModuleProvides text analysis and matching capabilities. The text is stored in native format using a high-performance storage mechanism known as D-Tree.
TimeSeries DataBlade ModuleSupports the definition and manipulation of time series data such as stock market information. The applications include portfolio analysis, trend determination, and so on.
VIR (Visual Information Retrieval) Content-based search and retrieve of DataBlade Module images and videos from multimedia databases by using searches based on the actual content of the image. The searchable attributes include color, shape, texture, and composition.
Web DataBlade ModuleTo support Web interactively from an Illustra Server.

Web DataBlade

One of the most interesting and most useful DataBlades from an Intranet practitioner's point of view is the Web DataBlade. The Web DataBlade is a collection of tools, functions, and examples for the development of intelligent, interactive, and Web-enabled database applications. The Web DataBlade pioneers the "remote authoring" capabilities where authors can securely submit contents and the HTML pages will automatically show the new information.

And naturally the Web DataBlade works with other DataBlades which enables one to interactively publish data like time series, statistical, and so on.

Using Web DataBlade

The HTML pages-containing HTML, embedded SQL statements, conditional logic, and error handling-are stored in an Illustra server database. The Web DataBlade adds the following (see Table 17.4) set of database-oriented markup tags to the normal HTML tags:

Table 17.4  Illustra Web DataBlade-Specific HTML Tags
<?MISQL> <?/MISQL>Specifies the SQL formatting instructions. Provides an optional conditional flag.
<?MIVAR> <?/MIVAR>Manages variables within the Application Page.
<?MIERROR> <?/MIERROR>Manages error processing within the Application Page.
<?MIEXEC> <?/MIEXEC>Enables the application designer to call system services from within the HTML page.
<?MIBLOCK> <?/MIBLOCK>Enables you to delimit logical blocks of HTML based on a conditional statement.

The Web DataBlade module dynamically generates HTML pages from these templates stored inside the database.

The Web DataBlade module consists of two components: the WebExplode function and the Illustra CGI driver called Webdriver.

When a link is clicked by a user, the browser client sends the associated CGI query to the Web server. The Web server launches the Illustra CGI driver Webdriver. This driver connects to the database and extracts the Web page-which is a row in a table issuing the SQL command. Now the WebExplode parses the extracted pages and executes the embedded queries in the <?MISQL> <?/MISQL> block. The results are "exploded" (hence the name WebExplode) and formatted onto the page in the form of text, images, video, or any other selected data type from other DataBlades. The WebExplode process runs in the Illustra database server. The resultant Web page is passed to the Webdriver which, in turn, sends it to the client browser via the Web server.

For example, at the Illustra site, a title page comes up when we get to http://www.illustra.com. From that page, there are links to other pages.

For the "Corporate Overview" page, when we click the link, the query http://www.illustra.com/
cgi-bin/Webdriver?MIval=about_corporate_overview
is fired, which fetches the required page.

The "About Illustra Web" page was generated by the query http://www.illustra.com/
cgi-bin/Webdriver?MIval=about
.

For the "Illustra server," the query was http://www.illustra.com/cgi-bin/
Webdriver?MIval=products_software_browse&name=I llustra+Object+Relational+Database+Management+System
.

Webdriver handles all aspects of database interface and customizes the applications based on information obtained from a configuration file, the CGI environment, URLs, and HTML forms. Webdriver also manages the database connection and retrieval of the Application Page from the database. The Webdriver also has a GUI page builder to create, edit, delete, and execute HTML pages in Web applications.

To optimize the connection management and handle peak loads between the Web server and Illustra database, especially for high-load applications, the Web DataBlade module provides the Webclient as an alternative to Webdriver. Using the Webclient, Intranet administrators can configure a predefined number of database connections to be established to manage all CGI process requests.

A few applications possible with the Illustra Web DataBlade are as follows. Please refer to the Illustra Web site for more applications and links to demo pages.

Unique features of Illustra:

In addition to the concepts like Web DataBlades, object extensions, remote authoring, and so on, there are two more concepts which make Illustra unique. They are:

Java Database Access

No Intranet book-especially the database access topic-will be complete without a discussion on Java and database access. Java Database connectivity is aimed at developing client/server applications either as a stand-alone application (which is composed of many Java classes and packages and could consist of some components which are downloaded from the Intranet) or as applets. The stand-alone application is more suited for Intranets. The future Intranet applications will be a set of Java objects involving multi-tier, multi-sourced data and possibly applets. Figure 17.7 shows the general scheme for a Java applet as well as a Java stand-alone application. Even though applets access is restricted to their server, this scenario will change once signed applets and other security schemes become prevalent.

Figure 17.7 : Java applets versus Java applications.

Applets access the database through the Web server from where they were downloaded. Applications can access data on any database server.

Java is suited for Intranet client/server applications because of its platform independence, robust language constructs, downloadable applets (easy installation and software maintenance), tight coupling to Internet/Intranet, and so on. To effectively implement a 3-tier or multi-tier intranet client/server application, JDBC is an essential component. There are other new classes like the commerce API, security API, multimedia API, and so on, which are a part of Java 1.1 which will enhance the attractiveness of Java as a viable client/server database access development platform.

There are at least three major ways in which databases can be accessed from Java. They are:

  1. JDBC (Java Database Connectivity). JDBC is the relational SQL API classes for Java applets and applications. In the following subsection, we will go into more details.
  2. Wrapper classes and Relational APIs. These are class libraries and packages provided by database vendors and third party developers to interact with specific databases. This category also includes the proprietary class libraries for multiple data source access.
    The RMI and object serialization APIs fall in this category. There are initiatives from the OMG (Object Management Group) to interface CORBA and Java. There are products like Orbix from Iona Technologies to interface Iona's ORB and Java. Microsoft will (if not already in alpha stage!) certainly have a Java-ActiveX classes/API.
  3. Object Databases. As we have seen in the earlier section, products like Illustra, which fall under object databases, have Java applet interaction through their own proprietary classes. This technology is still in its infancy stage. The ODMG (Object Database Management Group) is working on an API specification. The specs will work with other object initiatives like the OSQL transaction processing.

JDBC

The JDBC-Java Database Connectivity-is a set of classes to connect Java programs and applets to relational databases. The API enables a Java program to issue SQL statements and process the results. The API specification is developed by JavaSoft. The JDBC is database- and platform-independent. The JDBC specification and more details are available at http://splash.javasoft.com/jdbc. The JDBC spec underwent a 90-day public review that ended in June 1996. The current version, 1.00, dated June 12, 1996, has all the comments incorporated and is frozen.

JDBC Internals

The JDBC design was influenced by XOPEN SQL CLI and Microsoft's ODBC. The JDBC API consists of the java.sql class which one imports into the program using the import java.sql.* statement. The JDBC Driver/Manager implements the classes either in Java language or as a native library. Let us look at the sample implementation-JDBC-ODBC Bridge from Sun-Intersolv. Figure 17.8 shows the data flow for the JDBC-ODBC bridge implementation.

Figure 17.8 : Data Flow for JDBC-ODBC reference implementation.

The JDBC classes consist of database connections, SQL statements including stored procedures, result sets, and database metadata (which is information about the underlying result set to be interpreted with methods like getColumnName and getTableName). The main classes are as shown in Table 17.5.

Table 17.5  JDBC Main Classes (java.sql.)
TypeClass Name (java.sql.)
ImplementationDriver DriverManager DriverPropertyInfo
Database Connection
SQL Statements
Connection Statement PreparedStatement CallableStatement
DataResultSet ResultMetaData DatabaseMetadata
ErrorsSQLEXception SQLWarning
Date/TimeDate Time Timestamp
Misc.DataTruncation Numeric Types

The DriverManager creates the connection object- usually one per database. The connection objects have methods to create statement objects which have methods to create ResultSets. The SQL statements are executed from the statement object, and the data rows are read from the ResultSet.

The JDBC API is a specification (or interface in Java terms) and the driver manager is the OS- and hardware-specific implementation. Currently, most of the JDBC drivers are implemented with OS-specific components (like DLLs for the Windows environment). But they can also be implemented in Java for platform independence and possibly be downloaded as an applet.

To test the compatibility and standardize the JDBC API, JavaSoft and Intersolve are developing a JDBC compliance suite. The companies are also developing a reference implementation for the popular ODBC interface.

Vendor List

As of writing this chapter, the JDBC Web page lists about 28 companies that have endorsed the JDBC database access API. The list is growing and, when you are ready to do some evaluation, get the latest list from the JDBC Web page of JavaSoft http://splash.javasoft.com/jdbc/jdbc.vendors.html. I have listed the major players in Table 17.6. But I am sure there will be more innovative companies who will develop fast and easy drivers for JDBC. Please treat this list as a starting point and follow the links surfing the net.

Table 17.6  JDBC Vendor List
CompanyProduct/Implementation
Borland International Inc.JDBC & Interbase
IBMDatabase-2(DB2)
Informix Software Inc.Informix Database, Illustra
IntersolvJDBC,SequeLink
Oracle CorporationPL/SQL connection
Sybase Inc.JDBC Links to SQL Server 11
SymantecJDBC and more
Visigenic Software Inc.OpenChannel
WebLogic Inc.T3 Server, dbKona, and Kona Line
XDB Systems Inc.JETConnect