Enterprise Integration & Modeling: Metadatabase Research Home
 home || MDB Research | Virtual Lab | Case Tool | Downloads | Publications | Researchers | Links

Studio II.7 Web To Database Connectivity

Revised: September 2, 2003

This page summarizes the issues related to connecting databases to web pages and provides links to other sites which either deal with this issue or are pertinent to what is discussed here.

Background

  • Mosaic provided a GUI to the Internet. Netscape and Internet Explorer are the present generation of web browsers which enable easy access of text, images, sound and video files stored on a web server. HTML is the language in which web pages are written. A web page which merely provides information to users through access to files stored on a server is known as a static web page.
  • Although very popular, static web pages had a serious limitation: communication with the people browsing a site was one way only. The next generation of the web pages were made interactive, where the reader of the page could interact dynamically with the server. Pizza Hut created the first popular interactive web page in 1994 and FedEx, through an imaginative use of their web page to allow customers to track their packages, took the interactive use of web pages to a new dimension.
  • Presently, databases are being increasingly connected to Web pages. A good example is Rensselaer's Student Information System. In general, there are (1) Common Gateway Interface(CGI), (2) JAVA and JDBC, (3) Database Venders' solutions, and (4) Third party venders general purpose solutions. The first two are general and belong to the public domain.

(1) Common Gateway Interface(CGI)

  • A user interacts with a web server through CGI programming. The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers.
  • CGI is a simple protocol that can be used to communicate between Web forms and a program on the web server.
  • A CGI script can be written in any language that can read STDIN, write to STDOUT, and read environment variables.
    • AppleScript
    • Unix shell Script
    • PERL(Practical Extraction and Report Language) : Popular
      • Perl  is a scripting language well suited for CGI programming and provides extensions for connecting web pages to Oracle and other databases.
      • DBI (Database Interface) is an database access API (application program interface) for Perl. It defines a set of functions, variables, and conventions that provide a consistent interface with the target database.
      • Perl DBI module is available for free download from CPAN - Comprehensive Perl Archive Network web site at http://www.cpan.org.
    • TCL(Tool Common Language)
    • C/C++ : Popular
    • Visual Basic
    • Java
    • JavaScript
    • Visual Basic Script(VBScript)
  • Typical sequence of steps for a CGI script:
    • Read the user's form input from WEB Browser(HTML file).
      When the user submits the form, the CGI script receives the form data as a set of name-value pairs. The names are what you defined in the INPUT tags (or SELECT or TEXTAREA tags), and the values are whatever the user typed in or selected.
    • Do what you want with the data.
    • Write the HTML response to STDOUT.
      First, write the line
           Content-Type: text/html
      plus another blank line, to STDOUT.
      After that, write your HTML response page to STDOUT, and it will be sent to the user when your script is done.
  •  CGI programming entails creating a CGI program that the HTTP deamon will execute, transmit information to the database engine, receive results and display those results to the client.

Figure 1

(2) JAVA and JDBC
 

  • JAVA with JDBC(JAVA Database Connectivity) can be an another approach.
  • The JDBC API contains two major sets of interfaces: the first is the JDBC API for application writers, and the second is the lower-level JDBC driver API for driver writers. Applications and applets can access databases via the JDBC API using pure Java JDBC drivers, as shown below:

Figure 2

  • The graphic below illustrates JDBC connectivity using ODBC drivers and existing database client libraries

Figure 3 
 

(3) DBMS venders' solutions
 

  • Microsoft
    • Personal Web Server, Internet Information Server (IIS) :
      • - PWS turns any Windows 95 computer into a Web server and enables easy  publication of personal Web pages.
      • - IIS is the Microsoft® Windows NT® Server's built-in Web server
        - Both of them contains support for CGI and Internet  ISAPI DLL( Internet Server application programming interface  dynamic-link library).
        - Active Server Pages (ASP) technology is a powerful Web server feature. In brief, ASP allows developers to mix HTML and a scripting language(like as VBScript)  in a single file; developers can control how the server interacts with browsers through scripting. Both of them support ASP.
        - For querying an Access database in Active Server Pages (ASP), please refer to http://www.kamath.com/tutorial/Access1.asp.
        - You can install and see an example of Web To MS-Access Database Connectivity by using Apache click here
        - You can get more detail information here Developing and Deploying Interactive Applications on the Internet
        - Peze & Rviole Consulting company project handed out in the class is an implementation of connecting Access Database to web pages. The web server used in the project is Windows NT 4.0 server and Visual Basic is used as the scripting language.
    • Microsoft® Site Server 3.0
  • Oracle
    • WebDB :
      They claimed that the fastest and easiest way to "Web-enable" your Oracle database. WebDB is an HTML development environment for cost effectively, building, deploying and proactively managing web database applications and content-driven Web sites.
    • Java Interfaces:
      Oracle provides two simple means by which Java programmers (writing code in any tier) may conveniently and efficiently access relational data: JDBC and SQLJ
      SQLJ is Oracle's implementation of the JSQL standard, which specifies the integration of SQL statements in Java programs. SQLJ is more concise and thus easier to write than JDBC, and provides compile-time schema validation and syntax checking for easier debugging.
      The JDBC and SQLJ interfaces to Oracle7 and Oracle8 that come bundled with the database.
    • Oracle Application Server:
      Oracle Application Server provides an open, standards-based architecture which is ideal for developing and deploying your real-world business and commerce applications for the Web. Its scalable, distributed architecture and superior database integration are the foundation for supporting business-critical, transaction-based applications across Netscape and Microsoft HTTP servers, creating an easy upgrade path to an Oracle solution.
  • IBM

(4) Third party vendors' solutions

Many third party software tools are available and coming up. Three major tools are described here:

    • Sapphire /Web is a package from Bluestone Inc. that allows developers to create web interface to Oracle, Sybase and Informix databases. It is an X-Windows based tool and is available on variety of UNIX platforms as well as for Windows NT.
    • Cold Fusion is a web application development tool for Widows NT and Windows 95 servers. Cold Fusion offers a straightforward server-side markup language, a powerful application server, and a complete framework for Web applications.
    • DbLive@Web is a Java enabled ad-hoc query and reporting tool that is meant for non-technical end users to dynamically connect to one or more industry standard databases, build and run queries, analyze results and create written reports, charts and graphs without any knowledge of either SQL or HTML. The product operates from within any NCSA compliant Web browser such as Netscape's Navigator or Microsoft's Explorer and extracts data from a variety of corporate databases such as Oracle, Sybase, Informix, Progress and Microsoft's SQL Server and Access. It is claimed to be simple to use and is designed for end users needing dynamic on-line and live access to corporate data in making business decisions.
 

viu.eng.rpi.edu is hosted by Professor Cheng Hsu.
Rensselaer Polytechnic Institute
Department of Industrial and Systems Engineering (formally Decision Sciences & Engineering Systems)
110 8th St., Center for Industrial Innovation, Room 5123, Troy, NY 12180-3590

Copyright © 1997-2016. MetaWorld, Nothing on this site may be commercially used without written consent.

Valid XHTML 1.0! Valid CSS!