2-Tier Architecture in DBMS
The architecture of the Database management system plays an important role in developing and maintaining any database in any company. The appropriate selection of architecture for a database management system is necessary because it solves design problems and helps to access data quickly and securely.
There are following three types of architecture in database management system:
- 1-tier architecture (one level)
- 2 tier architecture (two-level)
- 3 tier architecture (three-level)
In this topic, we will discuss 2-tier architecture in DBMS
Two-Tier architecture
The two-tier architecture
in DBMS is a model of only two levels, i.e., the client-server model. The client tier is the first level in 2-tier architecture. The client is the presentation layer, a user interface that interacts with the user. The database server is the second tier or level in a two-tier architecture. The server model provides the data and processes the query presentation layer. In the client and server model, the client takes the inputs or requests from the user and sends them to the server, and then the server processes that information.
Components of two-tier architecture
There are two components or tiers in 2 tier architecture of DBMS, and they are:
1. Client-side application:
- A client-side application is a user interface application that interacts with the user and takes input from the user.
- It is a presentation layer that runs on clients like Smartphones, computers, Tablets, and many more.
- The client tier maintains a connection with the server side by sending requests to the server tier and communicates to establish a relation or connection.
2. Server / Database side application
- The server-side application takes care of the requests sent by the client tier and processes that query.
- In 2 tier architecture, the client-side application sends and receives requests and information with the database directly through the server-side application.
- The server tier stores data on a server.
- The application is used to interact with the user and help send requests from the client tier is ODBC and JDBC.
Real-life examples of two-tier architecture
- Daily used desktop applications such as excel sheets, word documents, and desktop games are a basic example of two-tier architecture.
- The contact management system developed using MS Access is the most common and used example of two-tier architecture in DBMS.
Advantages of two-tier architecture
- The client-server model is easy to understand.
- This model provides faster and more direct communication as there are only 2 layers.
- It helps to function with existing systems.
- The two-tier architecture is secured as a database and data is not interacting with the end user.
Limitation of two-tier architecture
Two-tier architecture cannot be used where a large number of users and data is present, and it can only be used for general-purpose desktop and web applications which are smaller compared.
Difference between 2-Tier and 3-Tier Architecture in DBMS
Parameters | Two-Tier Database Architecture | Three-Tier Database Architecture |
Definition | The two-tier architecture in DBMS is a client-server model. | The three-tier architecture is based on a web application model. |
Number of Layers | There are only 2 layers - the data tier (server), and the Client Tier (presentation layer) | It consists of three tiers- the Data tier, the Client tier, and the Business tier. |
Logic location | In a two-tier DB architecture, the logic is buried inside either the client layer (inside the user interface) or the database or server layer or can be inside both. | In a three-tier, the logic of the application is present in the middle layer, i.e., the business layer. That is why the middle layer is separate from the client and data layer. |
Establishment | It is easy to build, and maintenance is also easy. | The maintenance and establishment of three-tier architecture are complex. |
Speed | Two-tier DBMS has a lower speed of operations. | Three-tier DBMS have a comparatively faster speed of operations. |
Security | The two-tier architecture could be more secure as it allows the client or devices to communicate with the data layer directly. | The three-tier architecture is more secure as it does not allow its client or devices to communicate directly with the data layer or the server, making it more secure in the long run. |
Performance | It suffers from performance loss when used continuously and rapidly. | The three-tier architecture has comparatively higher performance but does lose performance when run on the Internet. |
Examples | Examples of two-tier architecture are the contact management system created by MS access, the railway reservation system, etc. | Examples of the three-tier database architecture are large websites on the Internet or buttons, labels, text on the design registration form, and many more. |