Zeng Xiaojin, Web database middleware technology (Key Laboratory of Computer Application, Yunnan University of Technology, Kunming 650051) Abstract: This paper introduces several middleware solutions for Web databases and compares their characteristics and shortcomings, and the latest technologies for Web databases. Keywords: Middleware CGIASPISAPINSAPIJDBC with the rise of InternetIntrranet and Web database middleware technology
Zeng Xiaojin
(Key Laboratory of Computer Application, Yunnan University of Technology, Kunming 650051, China)
Abstract: This paper introduces several middleware solutions for Web databases, compares their characteristics and shortcomings, and the latest technologies for Web databases.
Keywords: Middleware CGI ASP ISAPI NSAPI JDBC
With the rise and development of Internet/Intrranet, the connection between Web servers and database servers becomes more and more important. many manufacturers are constantly introducing new technologies and new products, making the connection more concise, fast, and convenient. Web and database connection technology has become the core of Web-based information management systems, laying the foundation for e-commerce on the Internet.
Generally, the basic frame for database access is implemented through web pages. the key technology in the system is the middleware solution.
Web page access database
Middleware manages communications between Web servers and database servers and provides application services. Because it resides on the Web server, the middleware software can call an external program or code that acts as a "transmission mechanism" between the Web server and the database server ", the execution query is returned to the end user in the form of HTML pages or plain text. The database server is responsible for managing data residing on the database server.
I. Currently, I will discuss several popular middleware solutions.
1. general gateway technology (CGI)
CGI is a standard for various programs on the Web site that can be used to access user interaction on the Web site. CGI scripts allow users to interact with databases on medium servers in the browser, complete database operations.
Almost all the server software in use supports CGI. developers can use any built-in Web server language to write CGI, including Perl, C, C, VB, and Delphi.
The working principle of CGI is that the browser searches for parameters through the form on the Web page. These parameters are passed to the Web server over HTTP, and the parameters (command line parameters or environment variables) are analyzed through the CGI script on the server ), at the same time, start the PaTH program, convert the analyzed parameters into SQL commands, submit them to the database server for execution, and then the CGI program returns the processing results to the Web server, finally, return HTML or plain text results to the client and disconnect.
The disadvantage of CGI is that the execution speed is slow. each time a Web server starts a Data Query Service, a new CGI process must be started, which is relatively expensive than the server resources.
2. ASP (Active Server Pages)
ASP is an open type. it can combine HTML scripts and reusable Active Server components to build an efficient dynamic Web-based application environment. ASP, new features of scripts running on the server can be added, such as accessing the database.
ASP supports the use of the Active Server component. The Active Server component provides a programmable interface for ASP through the Component Object Model (COM). one of the components is Active Data Object (ADO) provides a mechanism to connect to the database. Using ASP, you can directly include executable scripts in HTML files. HTML development and script development can become a process, unlike CGI, ISAPI, and other methods, programs and HTML files are required to generate and modify programs in different design environments.
3. application programming interface (API)
Due to CGI defects, Microsoft and Netscape have developed program code (such as dynamic link library DLL) in a dedicated Web server, which is generally in the same address space as the Web server software in the memory, therefore, each call is to run the corresponding program segment in the memory, rather than starting a new process like CGI, so the efficiency is much higher than CGI.
The main disadvantage of API technology is that it is difficult to develop and has poor portability. The developed application can only run on the corresponding Web server, and lacks universality.
To reduce the difficulty of developing applications, Netscape and Microsoft provide API-based programming interfaces on their respective servers. Netscape provides NSAPI-based Livewire, which is a fully-designed development solution. developers can develop and manage WWW interfaces and WWW sites, and access the database directly using SQL statements or ODBC. Microsoft provides an ISAPI-based IDC module, which is a dynamic connection Library (httpodbc. dll) of IIS and accesses various databases through ODBC.
4. JDBC technology
Java is a simple, object-oriented, easy to transmit, secure, multi-threaded execution control, and 3D space design language. it injects interactivity into the Internet. Java supports database access because SUN provides a standard Java programming interface (JDBC) for SQL database access ). The basis for Java is a series of class libraries, while JDBC defines the interface class libraries (Java. it is an API for executing SQL statements in Java. it consists of a series of classes and interfaces. these classes and interfaces are all written in Java, A program developer can establish a connection with the database in Java to execute SQL statements and process the results returned by SQL statements.
It is easy to use JDBC statements to access heterogeneous databases. for example, you only need to write a jdbc api to send SQL query statements to Sybase, Oracle, or Informix databases, at the same time, applications are written in Java language, with platform independence. do not write different applications for different platforms.
JDBC technical work
The working method of JDBC technology is as follows: the client first accesses the Web server, downloads the Java bytecode file, and loads the bytecode file of the Applet-related classes and the JDBC interface bytecode file to the client, then, the Web server is disconnected. then, the Applet interacts with the database server based on the database address, port number, and account. in this way, the interaction between the user and the database server is directly completed by the browser. The operability, maintainability, security, transaction processing capability, and efficiency of JDBC technology are high, so it has great advantages.
The connection mechanism between Java and database is different from that between CGI and API. running Java Applet on the client can bypass the Web server to directly connect to the database server through JDBC technology, and directly return the HTML page with the result to the client browser.
Like ODBC, the programming interface that JDBC provides to programmers is composed of two parts. one is the application-oriented programming interface jdbc api, which is provided for application programmers, the second is the underlying Driver interface JDBC Driver API, which is provided by various commercial database vendors. Currently, JDBC has been supported by many vendors, including Borland, IBM, Oracle, Sybase, and other companies. most popular database systems have released their own JDBC drivers.
II. Conclusion
The application of databases on the Web undoubtedly enhances the functions and attractiveness of the Web. we can use different middleware solutions to integrate the Web with the database to achieve the purpose of integrated information services. It is worth noting that JDBC technology, as a new bridge between Web servers and databases, still retains many notable features of Java itself, most popular database systems have released their own JDBC Drivers. The main problem is the code execution efficiency. at the same time, they also face powerful challenges from Microsoft ActiveX.
Contribution
1. [US] Jeffry Dwight, CGI development user manual, mechanical industry Press
2. [US] Daniel J. Berlin, by etal, Tsinghua University Press
3. Zhang Shiyong, database and WWW, Fudan University Press
4. Chen Jianwei, Web-based information system development, computer engineering (1998, 3)
5. Ma Libing, Sybase database and Web interconnection, Computer Engineering (1998, 3)
6. Chen Nan, Java remote database access model and implementation, computer system application (1998, 9)
7. Liu Dong and others, WWW-based database applications and computer system applications (, 4)
8. interfaces between JAVA language and DataBase-JDBC and computer system applications (, 3)
9. Luo Juan and others, Web and database technology, computer engineering (, 8)
10. Tan Yusong and others, based on the research and implementation of heterogeneous database connection technology in the Web environment, 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.