Internet Systems

Web Servers for Database Applications

By Kevin Reichard
Internet Systems, October 1996

Tighten up your Web applications by using a Web server with direct links to databases.


It used to be a simpler task to choose a Web server when there were relatively few on the market. Today, however, literally hundreds of Web servers are available, which in and of itself complicates the purchasing process. Adding to the complexity is the fact that the vast majority of Web servers basically do the same thing: process network requests from Web browsers.

For the database professional, however, choosing a Web server requires an entirely different approach than evaluations used in the mainstream Internet and Intranet worlds. On their own, Web servers provide a wide range of tools and philosophies when it comes to database integration. In the past, a Webmaster wanting database integration needed third-party solutions to provide access to an RDBMS such as Oracle or Informix. Today's new breed of Web server technology features direct links between the Web server and the database.

These new tools focus on ODBC connectivity, which is supported by Microsoft's Internet Information Server and is promised for future releases of Netscape Communications servers. These tools also focus on Sun's emerging Java Database Connectivity (JDBC) technology, which is promised for future releases of Netscape servers as well. The ODBC technology is available today from many server vendors; Java Database Connectivity is still under development, although the first vendor releases of this technology should appear by the time you read this article.

Using a Web browser to access an ODBC-complaint database via a Web server . . . if this sounds like client/server gussied up and sold in another form, it is. Basically, the Internet is the world's largest client/server computing platform, and today's Web-server tools merely mirror client/server conventions. Database solutions can be implemented on a Web server in four ways:

There are serious disadvantages to each of these methods. Any CGI call requires a separate process that needs its own overhead and CPU processing power, even a small script written in Perl. On a large-scale server you don't want hundreds or thousands of CGI calls eating up precious CPU time. And if the CGI program is elaborate - if it's written in C++, for example - you're practically ordering the server to grind to a halt if your traffic level is moderate to high. However, many new Web database integration tools still support CGI because it's a lowest-common-denominator technology supported by almost all Web servers.

Web server APIs address many of CGI's problems. Generic APIs tend to be a little more economical with CPU and processing requirements, but they're basically closed solutions, specific to the server software. However, because there's an emphasis on shared resources on the server, overhead can be reduced with server APIs. And server API technology has evolved to the point at which specific tools for database integration, such as ODBC connectivity, are robust and solid. Java and ActiveX tools are more open and can be transferred to any server that supports the technology. Both technologies are immature in that their originating developers (Sun Microsystems and Microsoft, respectively) are still working out all the technical specifications, and development tools (while plentiful) are far from being polished.

The Security Level

Database professionals should also consider the importance of security when choosing a Web server. There are no official standards on the Internet when it comes to security, although the major players are centered around a set of tools that includes the Secure Sockets Layer (SSL) and the S-HTTP (a secure version of the HyperText Transfer Protocol used for communications between a Web browser and a Web server). These technologies rely on encrypted communications between client and server. The two technologies are not mutually exclusive, so you can utilize both (which is the approach taken by Microsoft and Netscape Communications).

You should also consider security issues when planning an Intranet, although security is more easily addressed in these situations. Many corporations are setting up Intranets in which the majority of the data is stored on an internal Web server with no links to the outside world. When a user needs to access the larger Internet, those requests go to a separate Web server, which then facilitates those requests. This same server (or a separate one) may also house a firewall server, which screens incoming Web requests. Outside users can go through an authentication server to gain access to your internal Web server.

The Netscape and Microsoft Approaches

At the present time, Netscape and Microsoft are the 800-pound gorillas when it comes to Internet Web servers. Before you make any sort of decision about which Web server to choose, undertake an evaluation of the products from these two firms. Both are working on improved database access via the Web server, and both have gone the ODBC route.

Netscape servers employ CGI, Netscape API, and Java/JavaScript interfaces to database managers, as described in the Netscape API (a description of which can be found at http://home.netscape.com/newsref/std/server_api.html). The Enterprise and FastTrack servers conform to the Netscape Applications Platform, which calls for SQL connectivity via ODBC drivers. In addition, Netscape Communications ships LiveWire, a development tool that includes a JavaScript compiler and a Database Connectivity Library for direct SQL connectivity to relational databases from Informix, Sybase, Illustra, and Oracle, and ODBC connectivity for dozens of additional databases (including Microsoft Access, Borland Paradox, and IBM DB2).

Netscape also includes some database development tools as part of its general Web design tools. Netscape LiveWire Pro includes a developer version of Informix-OnLine Workgroup, the entry-level version of Informix's OnLine Dynamic Server. OnLine Workgroup maintains compatibility with Informix's scaleable database architecture that supports multiprocessor and parallel-processing systems. The copy of OnLine Workgroup bundled with LiveWire Pro is licensed for a single developer on a single Web server, with unlimited users on a single Web server.

Microsoft has taken a two-pronged approach to database integration with dbWeb, an end-user-oriented technology acquired from Aspect Software Engineering Inc., and the Internet Database Connector (IDC), a robust developer tool for serious, high-level integration. IDC is envisioned as a core technology of Microsoft's IIS 2.0, which shipped with Windows NT 4.0 in late July.

The dbWeb service handles data processing between an ODBC data source and the Web server. It processes queries from a Web browser and handles the communications between the browser, the ODBC data source, and the server to display the results on an outgoing Web page. The dbWeb service is an ISAPI (Internet Server Application Programming Interface) application, which eliminates the need for the more costly (in terms of system performance) CGI script.

The process of creating an ODBC/server link is simple. The dbWeb administrator includes an interactive Schema Wizard, which uses questions and answers to create the schemas. The wizard:

Database sources directly supported are Microsoft SQL Server, Microsoft Access, Microsoft Visual FoxPro, Oracle RDBMS, and other databases supporting 32-bit ODBC. dbWeb is not included as part of IIS but is available directly from Microsoft's Web site (http://www.microsoft.com) at no charge and will also be included with Microsoft Internet development tools (such as Internet Studio) and database tools (such as the next version of Access).

IDC is a developer technology for building custom database applications. It allows for direct and custom SQL statements, along with custom HTML pages for handling conditional output from an ODBC-compliant database.

This process is not complicated - but it's not simple, either. Your database information resides in an IDC text file on the Web server. This file specifies an ODBC data source and login information, as well as queries programmed in SQL to retrieve or update data. Output is sent to another text file that formats the results of the SQL queries for inclusion in a Web HTML page. Another HTML Web page acts as a front end to the IDC text file, which then acts as a gateway to a the ODBC database.

In addition, Microsoft is pushing ActiveX technology as a database access technique. ActiveX technology is still in development (although Microsoft produces a lot of it free of charge to developers), and any database developer already familiar with Microsoft programming tools (such as Visual Basic and Visual C++) should be watching ActiveX closely. OLE controls that were developed for other purposes - say, for a front end to an existing or legacy database system - can be migrated to the Web in the form of ActiveX controls, which can then be embedded as part of HTML pages. This process still requires that the server perform a large chunk of the computations needed to extract and input data - one of the reasons why CGI technology is frowned upon - but the tradeoff here is the relative ease in developing controls (Visual Basic and Visual C++ support ActiveX, so programmers can use already-familiar tools) and migrating them to the Internet.

The Java Approach

Also in the final stages of development is Java Database Connectivity (JDBC) from Sun Microsystems's JavaSoft division. JDBC is a SQL database access interface. The JavaSoft documentation at http://www.splash.javasoft.com/jdbc/ describes the technology as follows:

"The JDBC API defines Java classes to represent database connections, SQL statements, result sets, database metadata, and more. The JDBC API is implemented via a driver manager that can support multiple drivers connecting to different databases. JDBC drivers can either be entirely written in Java so that they can be downloaded as part of an applet, or they can be implemented using native methods to bridge to existing database access libraries."

JDBC applets can also directly access server ODBC drivers through a JDBC-ODBC Bridge driver, available from SunSoft. ODBC driver vendors are also building bridges from ODBC to JDBC.

This technology is meant more for the commercial software development community than for business application developers. For example, Borland, IBM, Informix, Oracle, Recital, Rogue Wave, SCO, Sybase, Symantec, and other vendors have already announced that their Java-based development tools will incorporate JDBC in the future. JDBC is a factor when discussing Web server tools because Netscape plans to emphasize it in future releases of Web development tools and Web servers.

The Oracle Approach: Working through the Intranet

In a sense, Oracle has no "Internet" strategy - instead, Oracle is going after the Intranet market with its realtime transaction model. (An Intranet is basically a corporate client/server setup that uses Internet technology, such as Web servers and Web browsers, instead of or in combination with traditional client/server tools.) This technology is scheduled to be fully implemented in the upcoming WebServer 3.0.

Basically, Oracle is flouting one Internet convention: WebServer 3.0 will make available persistent database sessions, which are essentially open-ended connections between a Web server, a Web browser, and a database server. Currently, the Web server model - derived from the process-happy Unix world - calls for a new process to be opened during each transaction, with processes being killed and started constantly. This approach works well in situations when there are relatively low-speed (14.4 or 28.8Kpbs) connections between a server and browser.

In an Intranet, however, it's assumed that there are higher-speed connections available, with a much larger bandwidth to play with. This means that an Intranet can more easily resemble the traditional client/server model of open-ended, persistent sessions.

The central component of Oracle's Intranet model is the Web Request Broker (WRB) architecture, which links Web servers to live applications and databases that can dynamically generate HTML-formatted data in realtime. This is server-side technology, with no CGI programming involved. Oracle WebServer 3.0 also adds a set of application modules, or "cartridges," to expand the Oracle Web Request Broker's functionality and enable multi-tier Web applications.

In addition, WebServer 3.0 will feature what Oracle calls the Inter-Cartridge Exchange (ICX), which lets cartridges exchange data on the fly while at the same time bridging data formats - Java classes, for example, can incorporate Oracle7 transactional capabilities.

Direct Links to Databases

Of course, you can make your job easier by starting with a Web server that features direct links to database management tools. In most of these cases, the database connectivity uses ODBC 2.0 or 2.5. In addition to the Web servers from Microsoft, Netscape, O'Reilly & Associates, and Oracle already discussed here, Table 1 lists a representative sample of Web servers that support direct links to DBMSs. (Many, but not all, of the Web servers listed in Table 1 can be found on the WebCompare Web site at http://www.webcompare.com.)

Some Advice

There's no single obvious solution for the database professional seeking the perfect Web server. In general, the Web world is cognizant of the problems posed by fusing database solutions with Internet technology, and statements by Microsoft, Netscape, Sun Microsystems, America Online, and Oracle indicate that these companies are paying some attention to these concerns.

You'll find the best way to evaluate which Web server can best fit your needs on the Internet: Download a server and set up an internal testing system. According to the previous listing of Web servers that feature database connectivity, almost all are available for evaluation via download. Microsoft has even gone so far as to include IIS with its Windows NT 4.0 Server. In addition, many of the development tools offered by Web-server vendors are also available free of charge, so time spent surfing the Web is probably time well spent.

In the end, there's no single right solution when it comes to choosing a Web server for database development. When you do make a buying decision, don't forget about the other factors involved. How good are the administration tools? Is it easy to set up? Is overall performance acceptable? Can it handle the load of traffic you anticipate at your Web site? How well does it integrate with your existing development tools? Look at the whole picture when buying a Web server - you don't do your users any favors if you go with a server that has great database-integration tools but terrible overall performance.


Kevin Reichard has written 16 books for MIS:Press/M&T Books. You can reach him at reichard@mr.net.


* JavaSoft, a subsidiary of Sun Microsystems Inc., 2550 Garcia Ave., Mountain View, CA 94043-1100; 800-626-5282 or 415-960-1300; http://www.javasoft.com
* Microsoft Corp., One Microsoft Way, Redmond, WA 98052; 800-426-9400, 206-882-8080, or fax 206-936-6729; http://www. microsoft.com.
* Netscape Communications Corp., 501 E. Middlefield Rd., Mountain View, CA 94043; 415-937-2555 or fax 415-528-4124; http://home.netscape.com.
* Oracle Corp., 500 Oracle Pkwy., Redwood Shores, CA 94065; 800-672-2537, 415-506-7000, or fax 415-506-7200; http://www. oracle.com.
* O'Reilly & Associates, 101 Morris St., Sebastopol, CA 95472; 800-998-9938 or 707-829-0515; http://website.ora.com.

TABLE 1
A Representative Sample of Web Servers with Direct Links to DBMSs
Product and Company DBMS Integration Features
AOLserver
America Online Inc.
http://www.aolserver.com/
server/index.shtml
A freely available Web server that ships with a module called nsdb, the Database Services module. It provides an interface to SQL relational databases, as well as connectivity to underlying database servers, through plug-in database drivers (the Windows NT version includes an ODBC driver for connecting to any ODBC datasource). If these drivers don't meet your needs, you can write your own drivers using Tcl or C using the AOLserver API. In addition, AOLserver includes the Illustra DBMS. Because there are already nsdb connections between the server and the database, you don't need any CGI scripts for accessing data. AOLserver ships in Windows NT and Unix versions.
CL-HTTP
Artificial Intelligence Laboratory, MIT
http://www.ai.mit.edu/projects/
iiip/doc/cl-http/home-page.html
A freely distributed Common Lisp Web server from MIT. It uses computed URLs instead of CGI scripts, basically using the Lisp programming language to process requests from a proprietary database system called COMLINK. It's available in Macintosh and Unix versions, with a Windows version under development.
Commerce Builder
The Internet Factory Inc.
http://www.ifact.com/ifact/
inet.htm
A commercial ($695) Web server featuring SMX (Server Macro Expansion), a set of macros that can be inserted directly into an HTML page. Some of the macros include basic SQL statements, such as select. Commerce Builder doesn't care what sort of SQL databases are on the other end. The premise here is that programmers and non-programmers alike can insert SQL calls within their Web pages with a minimum of work, and that premise seems to be largely fulfilled. Commerce Builder ships in Windows 95 and NT versions.
FolkWeb
ILAR Concepts
http://www.ilar.com
A commercial ($120) Windows NT Web server that uses ODBC and the HTML POST call for accessing databases. You can create all the calls you need from a Web page.
GoServe
IBM
http://www2.hursley.ibm.com/goserve
A freely available OS/2 Web server that uses REXX as a filtering tool for data requests. You'll need to know REXX and OS/2 database management before implementing GoServe as a database solution, because you won't learn a whole lot from the GoServe documentation.
Oracle WebServer
Oracle Corp.
http://www.oracle.com/products/
websystem/webserver
A commercial ($2495) Unix-based Web server that integrates with Oracle7 Enterprise and Workgroup Servers using PL/SQL or Java calls. The best results are realized, according to Oracle, when the WebServer is combined with the Oracle PowerBrowser Web browser.
Spinnaker Web Server
Searchlight Software Inc.
http://www.searchlight.com
A commercial ($495) Web server that uses CGI-DLL, which substitutes Windows DLL programs for the programs usually launched through Windows CGI. It ships in Windows 95 and NT versions.
SPRY SafetyWEB Server and SPRY Web Server
SPRY Inc.
http://www.spry.com
These two Web servers are basically the same as far as database access is concerned. The differences lie in SafetyWeb's ability to perform secure transactions thanks to SSL. Both servers allow direct access to ODBC databases with Server Side Includes, with the results inserted into HTML for the client. In addition, Windows DLL modules are supported. The commercial Windows NT Web servers from SPRY are priced at $895 for the SafetyWEB Server and $245 for SPRY Web Server.
TECS WebServer
TEC Solutions, Inc
http://www.tecs.com
A commercial ($10,000) Solaris Unix Web server. It supports direct access to relational databases (currently limited to Sybase SQL Server and Oracle RDBMS) via proprietary tags in HTML pages. These tags are combined into templates, and the templates can be altered depending on the information passed along to the server from the relational database. These tags specify the type of relational database and the format the resulting data will take, as well as any SQL calls needed. Multiple logins to multiple relational databases on the same HTML page are permitted. The biggest advantage to TECS WebServer is that a server has a direct connection to a relational database, and so no programs (CGIs, DLLs, or EXEs) are needed to access the data.
Web Commander
Luckman Interactive Inc.
http://www.luckman.com/wc/
webcom.html
A commercial ($249 for the Windows NT version, $129 for the Windows 95 version) Web server that supports ODBC accessing multiple databases via SQL statements inserted into HTML pages. WebBase
ExperTelligence Inc.
http://www.webbase.com
A commercial ($495) Windows NT Web server that directly supports a wide range of database formats (SQL Server, Access, FoxPro, Excel, Btrieve, dBASE III/IV, Paradox, Oracle version 6, and Oracle7). It combines a series of functions (including math, logic, comparisons, string manipulation, and dates) with a macro language (including if, case, forRow, and forIndex) and user- and system-defined variables (including %date%, %browserAddress%, and %Netscape%) to combine HTML pages with database data. WebBase can also be used in conjunction with other Web servers.
WebQuest
Questar Microsystems Inc.
http://www.questar.com
A commercial ($495 for the Windows NT version, $295 for the Windows 95 version) Web server that features Server Side Includes technology, which enables data to be inserted into HTML pages on the fly from other data sources, including ODBC, SQL Server, Access, Paradox, Excel, and dBASE databases.
Zeus Server
Zeus Technology Ltd.
http://www.zeus.co.uk/
products/server
A commercial (ý599 for the Zeus Server or ý999 for the Zeus Secure Server; evaluation copies are available as free downloads) UNIX Web server that uses a server API to facilitate external SQL calls to an external database without resorting to CGIs. The calls are handled as part of the existing process, cutting down on the CPU time needed to negotiate database maneuvers.

Table of Contents - October 1996 | Home Page
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to mfrank@mfi.com
Updated Monday, September 30, 1996