Database Connection System Architectures
2-Tier Architecture
OR
The above is a traditional 2-tier client-server architectures. The first uses Oracle and JDBC OCI driver (hence only for a Java Applicatio). The second diagram shows a 2-tier client-server architecture for Java Applet using the Thin JDBC driver.
ISSUES:State Management:
Greater scalability:
Security Considerations:
|
3-Tier Architecture
OR
The above is a 3-tier client-server-server architecture using Oracle and JDBC OCI driver. Here there is a middle Java w/JDBC application that sits on the server and client application or applet communicates with it via HTTP calls (or you could use sockets).
The middle JDBC application is responsible for connecting to the Database and performing queries. This is done in the same way the 2-tier Java application connects.
Besides the JDBC application, the JDBC driver must be installed on the server.
The server which the middle JDBC application and driver sits on may be physically different or the same as the Database server machine.
HOW TO INVOKE THE middle JDBC application:
- The user can use a CGI script that invokes it.
- Implement the JDBC application as a Servlet.
- Use Oracle's Web Request Broker API [if the application is deployed on Oracle's Web Application Server].
- Have the JDBC application be persistant (continually running) and instead of invoking it using HTTP the client application/applet communicates via a Sockets to make requests.
- Implement a IIOP style invocation. (short for Internet Inter-ORB Protocol, a protocol developed by the Object Management Group (OMG) to implement CORBA solutions over the World Wide Web. IIOP enables browsers and servers to exchange integers, arrays, and more complex objects, unlike HTTP, which only supports transmission of text. )
Advantages of 3-Tier over 2-Tier
State Management:
Greater scalability:
Optimized response time:
|