Thursday, November 20, 2008

Database Design in JAVA

Client-Server Database Design Considerations
(Database Design in JAVA)

Two-Tier Model

o Client makes direct calls to the database
o Java applets perform the JDBC calls

Advantages

o Maintains a persistent connection with the database.
o Minimizes resource requirements on the Web server by processing locally on the client.
o Results in performance gains over the network because of the direct interaction with the database.

Disadvantages

o The JDBC drivers may not be supported by some commercial browsers.
o These driver types typically call a native database driver, such as ODBC or another vendor-provided load module (e.g. DLL). These calls may be considered a security violation by the browser, since they create a potential risk for computer viruses. (Browsers with built-in support of JDK 1.1 are not restricted in this way.)
o Because the applet calls the database directly, the native database drivers must be installed and maintained on each client computer that will be running the applet. This increases the administrative requirements for all clients that require access to the database.


Three Tier Model using CGI

* The three-tier model introduces a middle layer that performs the interaction with the database.
* The middle layer is CGI (Common gateway interface).


Advantages

o Presents no security risk to the client and is supported by commercial browsers.
o No maintenance is required on the clients, because all database access is performed on the Web server.
o Provides central control and administration of database logic on the Web server.

Disadvantages

o Some performance loss is expected because of the middle layer (CGI).
o Inability to maintain a persistent connection to the database.
o Increase in resource requirements on Web server.

0 comments :

Post a Comment