web| Data | Database Web database Middleware technology
Zeng
(Kunming 650051, key Laboratory of computer application, Yunnan University of Technology)
Absrtact: This paper introduces several middleware solutions of web database, compares their features and shortages, and the corresponding latest technology of web database.
Key words: Middleware CGI ASP ISAPI NSAPI JDBC
With the rise and development of internet/intrranet, the connection between Web server and database server is becoming more and more important, many manufacturers keep introducing new technology and new products, making the connection more concise, fast and convenient. The technology of Web and database connection has become the core of web-based information management system, which lays the foundation for electronic commerce on Internet.
Generally speaking, the basic block diagram of database access through a Web page is shown in Figure 1, the key technology in the whole system is the solution of the middleware.
Figure 1, Web page access to the database diagram
Middleware is responsible for managing communication between Web servers and database servers and providing application services. Because it resides on a Web server, the middleware software is able to invoke external programs or "encodings" as "transport mechanisms" between Web servers and database servers, and to return information to end users as an HTML page or plain text, such as execution queries. The database server is responsible for managing the data residing in the database server.
First, the current several popular middleware solutions are discussed.
1. Universal Gateway Technology (CGI)
CGI is a standard for various programs on a Web site that can be used to access the user interaction of a Web site, using a CGI script that allows users to interact with the database on a medium server in a browser to complete various operations on the database.
Almost all server software supports CGI, and developers can write CGI in any Web server built-in language, including the Perl language, C,c++,vb, and Delphi.
The CGI work is the browser through the Web page of the form search parameters, these parameters through the HTTP delivery Web server, the server through the CGI script analysis parameters (command-line parameters or environment variables), while starting the Access program, the analysis of the parameters into SQL command, to the database server execution, The CGI program then returns the processing results to the Web server and finally returns the results of the HTML or plain text format to the client and disconnects.
CGI disadvantage is slow execution, the Web server to start a data query service, you must start a new CGI process, relative to the cost of server resources relatively high.
2. ASP (Active Server Pages)
ASP is an open, HTML script and reusable Active server components can be combined to create an efficient dynamic web-based application environment, using ASP, can increase the running on the server side of the script new features, such as access to the database.
ASP supports the use of Active server components, and the Active server component provides a programmable interface for ASPs through the Component Object Model (COM), where one of the components Active data Object (ADO) provides a mechanism to connect to the database. and using ASP to include executable scripts directly in HTML files, HTML development and script development can become a process, unlike CGI, ISAPI, and other methods, which require programs and HTML files to be difficult to produce and modify in different design environments.
3. Application Programming Interface (API)
In view of some of the CGI bugs, Microsoft and Netscape developed program code (such as dynamic link library DLLs) in a dedicated Web server, typically in the same address space as the Web server software, so that the corresponding program segments are run in memory each time the call is made. Instead of having to start a new process like CGI, it's much more efficient than CGI.
The main disadvantage of API technology is the difficulty of development, and the poor portability, developed applications can only run on the corresponding Web server, lack of versatility.
To mitigate the difficulties of developing applications, Netscape and Microsoft provide API-based programming interfaces on their respective servers. Netscape provides a NSAPI based livewire, a fully designed, comprehensive development program that enables developers to develop and manage the WWW interface, the WWW network, and access the database directly using SQL statements or ODBC. Microsoft provides an ISAPI based IDC module, which is a dynamic connection library for IIS (Httpodbc.dll) and accesses various databases through ODBC.
4. JDBC Technology
Java is a simple, object-oriented, easy to transfer, secure, multithreaded execution control and 3D space design language, it injects interactivity into the Internet. Java supports access to databases because Sun provides a standard SQL Access database Java language Application programming interface (JDBC). The basis for composing the Java language is a series of class libraries, and JDBC is the definition of Java and Database Interface class library (java.sql package), it is an API for executing SQL statements in the Java language, consisting of a series of classes and interfaces that are written in the Java language, through which a program developer can establish a link to a database in the Java language and hold Row SQL statements and processing the results returned by the SQL statement.
Using JDBC makes it easy to access heterogeneous databases using SQL statements, such as through the JDBC API, where you can send SQL query statements to a sybase,oracle or Informix database and write applications in the Java language, using just one JDBC API. Platform-Independent, do not write different applications for different platforms.
Figure 2, JDBC technical work diagram
Using JDBC Technology It works by: The client first accesses the Web server, downloads the Java bytecode file, and then the bytecode file of the applet-related class and the JDBC interface bytecode file are planted to the client and then detached from the Web server, and then the applet according to the database address, The port number and account number interact with the database server connection, so that the user's interaction with the database server is done directly by the browser. JDBC technology has great advantages because of its operability, maintainability and security, transaction processing capability and efficiency.
Java's connection to the database differs from CGI and APIs, and running Java applets through JDBC technology can bypass the Web server directly from the database server and directly return the HTML page with results to the client browser.
Like ODBC, JDBC provides programmers with a programming interface that consists of two parts, one is the application-oriented programming interface JDBC API, which is provided for application programmers, and the second is for the underlying driver interface jdbc Driver API, which is provided by various commercial database vendors. Currently, JDBC has been supported by many vendors, including companies such as Borland,ibm,oracle and Sybase, and most of the current database systems are in the process of introducing their own JDBC drivers.
Second, concluding remarks
The application of the database on the Web undoubtedly enhances the function and attraction of the web, so we can integrate the Web and the database with different middleware solutions to achieve the goal of integrated information service. The focus is on JDBC technology, JDBC as a new link between Web servers and databases, while still retaining many of the compelling features of Java itself, most popular database systems have launched their own JDBC driver, the main problem is the efficiency of code execution, while It also faces a powerful challenge from Microsoft's ActiveX office.
Reference documents
1, [US]jeffry Dwight Wait, CGI development manual, Machinery Industry Press
2, [Beauty]daniel J.berlin,etal, Tsinghua University Press
3, Zhang Xiyong series, database and WWW, Fudan University Press
4, Chen character, web-based Information system development, Computer Engineering (1998, 3)
5, Shaoli, Sybase database and the interconnection of the Web, Computer Engineering (1998, 3)
6, Chen Nan, Java remote database access model and its implementation, computer systems Applications (1998, 9)
7, Liu Dong and so on, based on WWW database application, computer system application (1998,4)
8, Rodong, interface between Java language and database--JDBC, computer system application (1998,3)
9, Luojuan, Web and database technology, Computer Engineering (1998,8)
10, Tan Yusung and so on, based on the web environment of heterogeneous database connection technology research and implementation, computer Engineering (1998, 8)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.