Java Reference
In-Depth Information
Three-tier Model
In the three-tier model illustrated in Figure 4-2 , commands are sent to an application
server, forming the middle tier. The application server then sends SQL statements to
the database. The database processes the SQL statements and sends the results
back to the application server, which then sends them to the client.
Figure 4-2: Three-tier model typical of Web applications
These are some advantages of three-tier architecture:
 
Performance can be improved by separating the application server and database server.
 
Business logic is clearly separated from the database.
 
Client applications can use a simple protocol such as CGI to access services.
The three-tier model is common in Web applications, where the client tier is
frequently implemented in a browser on a client machine, the middle tier is
implemented in a Web server with a servlet engine, and the database management
system runs on a dedicated database server.
The main components of a three-tier architecture are as follows:
 
Client tier , typically a thin presentation layer that may be implemented using a Web browser
 
Middle tier , which handles the business logic or application logic. This may be implemented
using a servlet engine such as Tomcat or an application server such as JBOSS. The JDBC driver
also resides in this layer.
 
Data-source layer , including the RDBMS
Part III of this topic illustrates additional capabilities of the JDBC API in a three-tier
application that uses a Web browser as the client, an Apache/Tomcat server as the
middle tier, and a relational database management system as the database tier.
SQL Conformance
Although SQL is the standard language for accessing relational databases, different
RDBMS systems support a large number of different dialects of SQL. These
differences range from such minor details as whether a SQL statement needs a
closing semicolon to major variations such as the absence of support for stored
procedures or some types of joins in some database systems.
Search WWH ::




Custom Search