Given by Gang Cheng, C.W. Ou, Geoffrey C. Fox at ARL Database Tutorial on February 98. Foils prepared 7 October 97
Outside Index
Summary of Material
The Strengths, Weaknesses and Synergy of Web and Database Technologies |
Architectures of Web and Oracle RDBMS Integration |
A Technical Overview of The Oracle-Web Integration |
using Oracle WebServer and PL/SQL |
Examples of a Web-based Search Interface for the Phone List Database |
Outside Index Summary of Material
Gang Cheng, Geoffrey Fox, Nancy McCracken, Marek Podgorny, Chao-Wei Ou |
Northeast Parallel Architectures Center |
Syracuse University |
The Strengths, Weaknesses and Synergy of Web and Database Technologies |
Architectures of Web and Oracle RDBMS Integration |
A Technical Overview of The Oracle-Web Integration |
using Oracle WebServer and PL/SQL |
Examples of a Web-based Search Interface for the Phone List Database |
Characteristics
|
main WWW components (before Java, VRML, LiveMedia etc.):
|
Tedious to manage and update (HTML) files on the server side difficult to keep pages of data updated automatically --- modification usually done by a human using word processor or editing tools |
A plain UNIX file system as "database" only supports primitive functions such as open,read/write and close |
More powerful operations on files are required for an information system which are supposed to provide information instead of raw data. |
e.g. need: low-level data manipulation operators such as those provided in RDBMS: select, insert, update, commit, rollback,etc |
Meaningful information needs to be generated on-the-fly from raw data |
Characteristics
|
main RDBMS components
|
Strengths
|
Weaknesses
|
Database techniques used in Web technology
|
Networking techniques used in database technology
|
Web server integrated with database is enhanced with:
|
Database server linked to web server is enhanced with:
|
A powerful backend text searching engine supporting complex queries an efficient, reliable and sophisticated data management system supporting representation and organization of logical relationships among information entities |
A dynamic data processing engine, provided with opportunity for optimized searching performance in large information systems |
A time-dimension added HTML programming engine which displays latest available data. |
A transparent networking interface for remote database server access |
A universal GUI-based search interface for hypertext-added data retrieval |
A truly globally-shared data system for maximum information dissemination
|
An integrated multi-media information system |
Education
|
Research
|
Industry
|
Basic features in HTTP protocol -- a client-server model:
|
The Web is Stateless
|
Fill-out forms are used for the server to accept clients run-time input from a HTML page |
Pre-edited HTML files (links) ---
|
CGI scripts --- programs (shell,perl,programming languages) to
|
CGI is Interface for running external programs on a Web server
|
Web Server and DB client must be on the same machine |
DB client and DB server can be on different machine and a proprietary networking protocol (e.g., SQL*NET for Oracle7) is used |
Inter-process Comunication (IPC) is used for the Web server to communicate with DB client on the same machine |
Integrates Oracle7 databases with the Web |
Manage Web information effectively |
Provides transaction logic and integrity to Web applications |
Uses PL/SQL stored procedures to build dynamic HTML documents on the fly |
Bring all the benefits of Oracle7 to the Web, including portability, scalability, manageability, and gateway technology |
Web pages created on the fly to include data dynamically obtained from Oracle7 |
Oracle7 stored Web related information |
Extract the PL/SQL package and procedure name embedded in URL and log on to the DB |
Set up the parameters passed from the Web server so that they are accessible to the PL/SQL procedure |
Execute the PL/SQL procedure which extracts data from DB and formats it into an HTML document stored in a PL/SQL table |
Performance: tends to execute faster than regular SQL code becuse it doesn't need to be parsed and interpreted before executing |
Portable across all Oracle platforms: resides completely inside the database thus is 100% portable to any platform that Oracle7 runs on |
Modularity: has procedure,package etc mechanisms for software development in modules |
Why not? Not portable to other databases! |
utility packages that simplify the generation of HTML documents from within PL/SQL (HTP and HTF packages) |
each HTML tag has a corresponding function and procedure |
the procedure generates a line of output in a PL/SQL table |
when the entire document is done, the OWA takes the contents of the PL/SQL table and writes it to standard output |
Data and SQL Engine
|
Procedural and programmable mechanism |
Use PL/SQL for data manipulation and processing. PL/SQL:
|
HyperText Procedures (HTP)
|
HTF (HyperText Functions) is the corresponding package which contains PL/SQL functions for generating HTML tags |
i.e. it returns HTML string whereas HTP writes HTML
|
Details about syntax and use of each procedure and function in HTP and HTF can be found from the handout |
CREATE PACKAGE EXAMPLE is procedure get_phoneno_by_name(name IN VARCHAR2); -- only one procedure |
END EXAMPLE; |
CREATE PACKAGE BODY EXAMPLE IS
|
BEGIN
|
/* print out the query result */ |
htp.p(htp.item||'The ' || ptype ||' phone no. of ' || fname || ' ' |
|| lname || ': ' || phone); |
END LOOP; |
CLOSE person_cur; -- close the cursor after it is done |
htp.ulistClose; |
END get_person_by_name; |
END EXAMPLE; |
A HTML form page to accept user search input and invoke the CGI script on the web server to access the database
|
Typical URL - http://osprey7.npac.syr.edu:6666/CPS616/owa/ |
phone_pkg.get_person_by_name |
http - specifies protocol to use |
osprey7.npac.syr.edu:6666 - specifies hostname |
CPS616/owa - specific the OCI program that needs to be executed |
phone_pkg - specifies the PL/SQL package that owa will invoke |
get_person_by_name - specifies the PL/SQL procedure that owa will invoke |
Query results are displayed in another Web page as (if user typed in 'geoffrey') |
<html><header> |
<title>Query Results</title></header> |
<body><h1>Query Results</h1> |
<ul> |
<li>The office phone no. of Geoffrey Fox: 3154434889 |
<li>The home phone no. of Geoffrey Fox: 3154238422 |
</ul> |
</body> |
</html> |
Details of the phone-list example can be found from the handout or at http://osprey7.npac.syr.edu:3768/ |
reference-docs/cwou/database |
Further application examples can be found at
|