Skip to content

Two-tier and Three-tier Database Architectures

Statement

For your discussion assignment: Explain the major differences between two-tier and three-tier database architectures.

Answer

  • A Database Management System (DBMS) is software that organizes accessing and manipulating data. Usually, the consumers (clients) of this data are not physically existent in proximity, thus they connect to the DBMS through a network.
  • Depending on the use case, the architectural map of such connection maps into two major types: two-tier and three-tier.
  • In a two-tier architecture, the client connects directly to the DBMS, which can answer all user’s requests. This is the simplest architecture, but it is not scalable, as the DBMS is a single point of failure, and it is not designed to manage traffic, load balancing, or rate limiting.
  • In the three-tier architecture, a third layer is added between the client and the DBMS. This layer is called the middle-tier application server. In this architecture, the client connects to the application server, which in turn connects to the DBMS. This architecture is more scalable, as the application server can handle the traffic, and the DBMS can be scaled independently.
  • The three-tier architecture is more flexible, as the application server can be written in any language, and the DBMS can be changed without affecting the application server. However, the three-tier architecture is more complex, as it requires more components to be managed.
  • The image below (Silberschatz et al., 2001, p.20), puts the two architectures in a side-by-side comparison.

Two-tier and Three-tier Database Architectures

  • The two-tier architecture is fine for small applications, however, nowadays, you will rarely see it in use.
  • The three-tier architecture is the most common, and it is suitable for most applications. The application server can answer all requests, and it can decide if the request needs to go all the way to the DBMS, or if it can be answered by the application server itself by applying some caching mechanisms to reduce the load on the DBMS.
  • Applications today usually run on a web-based architecture, aka, the cloud, as businesses do not manage their physical infrastructure anymore, and in such environments, the applications server is exposed to the world, which can handle authentication and authorization, ensuring that only authorized users can access the application server, and the application server can connect to the DBMS.
  • Exposing the DBMS directly to the clients is a huge security risk, that can be reduced by putting a third layer of filtering between the clients and the DBMS.

References

  • Silberschatz, A., Korth, H.F., & Sudarshan, S. (2001). Database System Concepts (4th ed.). New York, NY: McGraw-Hill.