A Simple Web-enabled System for Database Management

The Pennsylvania State University The Graduate School Capital College

A Simple Web-enabled System for Database Management

A Master's paper in

Computer Science By

Ping Wang @2000 Ping Wang

December 2000

Abstract

A database management system (DBMS) is used to provide an environment that lets people store and retrieve information conveniently and efficiently. The World Wide Web is the most popular and widespread information service on the Internet. This paper describes a program that connects to a database system and allows database managers and database users to collect and access data through the Web. In our system, most complicated and redundant work is transparent to database managers and users. Also, the system provides friendly interfaces. This allows people with limited training to work with our database system. The system is a CGI application developed using the Perl programming language.

Table of Contents

1. Introduction

1

2. System Description and Implementation

7

General information about the implementation

7

Running the CGI program on the Internet

13

Implementation review

26

3. Conclusion

34

References

Table of Figures

Figure 1. Diagram of Qingru Zhang's system Figure 2. Diagram of our system Figure 3. Example of an input text file Figure 4. Login page Figure 5. Example of an error message page Figure 6. Welcome page Figure 7. Manager page Figure 8. Create table page Figure 9. Create query page Figure 10. Result page from deleting a query Figure 11. User page Figure 12. Table value input page Figure 13. Query result page Figure 14. Query variable entry page

38

3 4 11 13 14 15 17 18 29 20 22 23 24 25

1. Introduction

Web-enabled applications provide solutions for education, business, entertainment and many other application areas. For example, global education allows students around the world to take the same class on the Web. In most such applications, a Web browser provides a front end to existing database systems. Web servers are responsible for the other end of the connection, listening for incoming requests and transmitting the desired document back to the browser. Web documents often correspond to real, physical files stored on one of the server's disks. When a request comes in, the server finds the corresponding document on its disk drive and sends it off. However, Web documents don't have to be static files. To deal with dynamic documents, Common Gateway Interface (CGI) scripts are used on the server's side. These allow designers of Web sites to create dynamic documents that change every time they are accessed or in response to different user requests [Harr99].

ODBiC (Open Database Internet Connector) is an example [Harr99]. It has many unique built-in functions to simplify some common requirements. For example:

? Automatic HTML table generation from database queries. ? Automatic "query by example" queries generated from an input. ? Automatic HTML forms and SQL statements for database INSERT and UPDATE

operations.

- 1

? Automatic HTML "pull-down choice lists" with choices selected from the database. ? Easy "loop" processing for multiple rows selected by a query. ? Easy multiple-level "master/detail" or "category" grouping of query results. In addition to database access, ODBiC provides many other functions for creating dynamic Web pages. It is a consumer product for Web-enabled database management.

Database interface is the primary purpose of such applications, and is fundamental to today's booming electronic B2C (Business to Customer) and B2B (Business to Business) marketplaces. This paper introduces a Web-enabled database management system -- a CGI application implemented using Perl. Our system is a simple and easy to use database Internet connector. It is similar to ODBiC and is based on a system developed by Qingru Zhang. In Zhang's paper "A system to generate a simple and reusable Web-enabled solution for database queries"[Zhang00], she explained how to implement a specific system that generates a CGI program for database users (shown in Figure 1). To use her system, one needs to do the following:

1. Create an input text file that contains table and query information 2. Run a translation program that reads this text file and generates a target CGI program

and a standard file (called, for example, Xfile) which contains statements for creating tables 3. Create the tables in the database (for example, using the DB2 command "db2 -f

- 2

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download