CDBWEB is a Web application which allows the analysis and update of Configuration Database's (CDB) data through a web browser and it's divided into two main modules:

CDBWEB is written in Oracle's PL/SQL and consists in a set of PL/SQL stored procedures which interact with the user's browser through HTTP. Upon receiving browser's requests these stored procedures dynamically generate the HTML pages (or any other kind of files such as XML files for example) which are returned to the browser through the HTTP protocol. PL/SQL's stored procedures generate the HTML pages by invoking procedures from Oracle's HTP package such as the HTP.print procedure. This package is part of Oracle's PL/SQL Web Tookit which is aimed for the development of Web applications.

By using PL/SQL instead of other languages/technologies (PHP or CGI scripts for example) to build Web applications you have the following advantages:

  • The overhead of querying databases is much smaller since PL/SQL procedures are stored in the Oracle Database server
  • Execution of DML statements (select, update, insert and delete), dynamic SQL and cursors within the PL/SQL procedures
  • There is no need to fork a new process to handle each HTTP request (as it happens with CGI for example)

The following picture is an illustration for the interaction between a user's browser and a PL/SQL Web application:


Note: usually the Oracle Database server is in the same machine as the Web server.

The interaction's steps are the following:

  1. While visiting a Web page, the user clicks on a hyperlink or submits data in a form. This action causes the user's Web browser to send a request for a URL to the Web server. The URL encodes the name of the PL/SQL stored procedure (as well as any parameters passed to it if any) which will be invoked to return a response (an HTML page or any other kind of file) to the user's Web browser. The name of the target procedure can be found at the end of the URL. The target procedure's name is in the form X.Y, where X corresponds to the name of the PL/SQL package to which the procedure belongs to and Y corresponds to the procedure's name.

    For example, in the following URL the target PL/SQL stored procedure is named main and belongs to a PL/SQL package named web :

    Any parameters passed to the target procedure are encoded the same way as parameters in a common URL query (after a ?). In the following example URL, the execute_general_search procedure from package web is invoked with the value clustername for parameter p_fld1, value lxplus for parameter p_data1 and value xml for parameter p_outputformat :

  2. The Web server decodes the requested URL to extract the name of the stored procedure which is going to be invoked on the Oracle Database server. If the URL also specifies parameters to be passed to the procedure, the Web server extracts them. After decoding the URL, the Web server makes a request to the Oracle Database server to invoke the stored procedure with the extracted parameters.

  3. The stored procedure is executed. While it is being executed, the procedure calls procedures from the PL/SQL Web Toolkit to generate an HTML page (or any other kind of file). This page's contents may vary according to the database contents at the time the request was received and according to the value of the parameters which were passed to the procedure.

  4. After the stored procedure has finished its execution, the Oracle Database server delivers the generated page to the Web server.

  5. Finally, the Web server sends the page received from the Oracle Database server to the user's Web browser.

This topic: Sandbox > FilipeMananaSandbox > Introduction
Topic revision: r2 - 2007-07-30 - FilipeManana
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback