Java Applets and Data Bases Connectivity
Simple Approach






Damir Kirasic
damir.kirasic@fer.hr

Hrvoje Zokovic
hrvoje.zokovic@fer.hr

Faculty of Electrical Engineering and Computing
Unska 3, 10000 Zagreb, Croatia














The purpose of this presentation is to show you a small, preliminary project which demonstrate the possibility of connecting Java applets and data bases.

In particular, a small applet which can search Informix data base consisting of list of publications in our library will be demonstrated.















Outline of presentation:












Computers involved


Three computers scenario:
















Two computers scenario:














Programs involved


4 program components:
  1. appClient - resides on the Client machine
  2. appTransfer - resides on the WEB Server
  3. dbAgent - resides on the DB Server
  4. RDBMS - resides on the DB Server













Note: Instead of Java applet we can have a stand-alone Java application on the client side. The appTransfer program is not necessary in that case but whith appTransfer we can satisfy both situations.

Note: appTransfer is necessary in the three computers scenario and when we have Java applets on the client side because Java applets can open connections only to the WEB Server from which applet is downloaded.

In future we could use signed applets which can open connections to the arbitrary computers but we must wait for browsers which support them.












appClient's tasks:
















appTransfer's tasks:

















dbAgent's tasks:

















What is inside programs:



The source code for the appClient can be found here.

The source code for the appTransfer can be found here.

The source code for the dbAgent can be found here.













"Official" approach: JDBC



What is JDBC:
JDBCTM is a JavaTM API for executing SQL statements. (As a point of interest, JDBC is a trademarked name and is not an acronym; nevertheless, JDBC is often thought of as standing for "Java Database Connectivity".) It consists of a set of classes and interfaces written in the Java programming language. JDBC provides a standard API for tool/database developers and makes it possible to write database applications using a pure Java API.

(The definition is taken from the JDBC guide written by the Java Team.)

Click here for the complete JDBC guide.







The future of the applets and data base connectivity:



The future is great: