DB2 Connect on the web server

 

IBM® provides HTTP (Web) servers with all DB2 Connect™ products. DB2 Connect server products, such as DB2 Connect Enterprise Server Edition, provide out-of-the-box support for Apache or Lotus® Domino® Go web servers and can also work with any other web server such as Microsoft® Internet Information Server or Netscape Enterprise Server.

If you are working with the DB2® family of databases running on zSeries®, System i™, VM, and VSE systems, a DB2 Connect server product is required on the Web server. DB2 Connect server products will provide the libraries and communication interfaces to enable Web servers to access these host and System i platforms. TCP/IP can be used to communicate between the Web server and a database running on zSeries, System i, VM or VSE.

Note: IBM web solutions provide the ability to work with multiple databases within the same Common Gateway Interface (CGI) script (such as PHP) or within the same transaction in a CGI script.

Stored procedures

An important consideration for web applications, as in the client/server world, is to minimize the traffic that occurs between the HTTP server and the back end database. This consideration is particularly important in high-volume transactional processing, which is the heart of most e-business applications.

The recommended approach is to combine CGI application programming with the programming and business logic encapsulated in stored procedures. DB2 Database for Linux®, UNIX®, and Windows®, and DB2 Universal Database (UDB) on OS/390® and z/OS®, DB2 for z/OS, DB2 UDB for iSeries, DB2 for i5/OS, and DB2 for VSE all share the same parameter convention for invoking stored procedures.

As with regular web interface scripts, the web browser submits the form to the web server, where the web interface script is run. However, instead of each individual SQL statement being sent to the DB2 database, a request to execute a stored procedure is sent. This stored procedure encapsulates a number of SQL statements that would have otherwise been run individually. Stored procedures reduce the number of messages flowing back and forth between the web interface script and the back end database.

The key benefit of stored procedures is reduced network traffic between the HTTP server and the DB2 database back end.

Parent topic: DB2 Connect scenarios