n-Tier Architecture on the Web
An n-tier system has the server tasks divided among more servers than the three-tier system. Now we
have divided the web server into three parts, one to handle the web services, one to handle the sessions
and a third to perform the business logic (run the bulk of the scripts). Our connection now links the
business logic layer and the data store. As in every case in a "tiered" system (2-, 3-, and n-tier) the
connection runs between the data server (DBMS) and the next layer up.

(Click image for full size)
In the graphic below, the hardware and software is the same, but we see that more than one server in an
n-tier system can establish connections and pass SQL statements to the Data Server (DBMS). Here the
session server passes and receives data via SQL statements. Thus within one site we may have two or
more servers creating connections and passing SQL statements to a DBMS. We expand further on this
idea in the section titled Data Warehousing below.

(Click image for full size)
Mainframe and Terminals
A mainframe/terminal system resembles the two-tiered system described earlier. However, the
terminals and mainframe are usually in one facility and thus the connection is normally through
dedicated wiring and not through the Internet. Second, the terminal has a minimum of processing
power, so it is controlled by the mainframe. As of 2001, this system is mostly limited to older
installations or high security systems.

(Click image for full size)
Mainframe and Terminals with a Separate Datastore
A mainframe can split off the data server in the same way that our LAN and website examples did when
moving from two- to three-tier architectures. In this scenario we see that the mainframe handles the
business logic but for data it sends a SQL statement out to a data server running a DBMS. The
connection is from the business logic mainframe to the Data Server.

Mainframe to Mainframe
In each of the scenarios above there is a person involved. An employee (hopefully smiling and fully
vested) sits at the desktop PC or a customer (hopefully with a loose wallet) sits at the other end of the
Internet on a PC with a browser. But SQL can also handle communications about data between
machines with no person involved. In fact SQL is a common language to establish communication
between legacy systems with completely different hardware, operating systems and software (and
probably incompatible administrators to boot).
In this graphic we see that an IBM mainframe is able to get information on customers from a VAX
mainframe. Although there is a SQL Requester there is no front end because there are no humans
involved.
