3- Tier Architecture in DBMS
Three-tier architecture is an application software architecture that arranges the output into three parts or tiers that are: the presentation tier, where the user interacts with the application; the application tier, where data is handled; and the third is data tier, where the data or the output related to the application is stored.
The main benefit of three-tier architecture in DBMS is that each tier performs on its framework. Each tier can be developed individually by their development team and upgraded as needed without touching the other tiers.
3-Ters in DBMS
1. Presentation tier
The Presentation tier or user interface tier is the communication layer where the end-user communicates with the application with the help of the presentation layer. The main purpose of this tier is to present the information to the end user and collect information from the user. It is the top tier. The presentation layer can run on a web browser or application on a desktop as a graphical user interface (GUI). Web browser presentation layers are developed using HTML, CSS, and JavaScript, and Desktop applications can be developed using various languages depending on the platform.
2. Application tier
The application tier is mostly called the client-side tier, and the logic tier. It is the main component of the application. The information collected in the presentation tier is prepared, and the application tier transfers the requests (input) to the servers on the other side. It acts as an intermediate between the user and the server. The application tier can also add, delete or modify data in the data tier.
The client-side tier is developed using languages like Python, Java, Perl, PHP, or Ruby, and it interacts with the data tier using an application programming interface (API).
3. Data tier
The data tier, or database tier, is the last in the architecture of the DBMS. It is the tier where the processed data and information are stored and managed. It is simply the client-side server or back end of the database. The data tier can be composed of any relational database management system such as PostgreSQL, MySQL, MariaDB, Oracle, DB2, Informix, or Microsoft SQL Server or in a NoSQL Database server such as Cassandra, CouchDB, or MongoDB.
Note: In a three-tier architecture application, the first and last tiers, the presentation tier and data tier, cannot communicate directly with each other; all the communication is done with the help of the application tier.
Advantages of 3-tier architecture in DBMS
Benefits of three-tier architecture in DBMS include:
- Faster development: Each tier of DBMS can be developed once by separate teams, it helps an organization to grow in the market faster, and the latest languages and tools can be used in each tier.
- Less interdependence: Any error or fault in one tier does not or is less likely to affect the performance of the other two tiers.
- Security: As the presentation and data tiers cannot communicate directly, there will be no unauthorized access, and if any, it can be prevented.
Disadvantages of three-tier architecture in DBMS
- Complex: due to the availability of three layers/ tiers, data is dependent on all three tiers, which makes it complex and hard to implement.
- Late responses: sometimes, it can be difficult to get output due to the presence of middle layers, it can delay the response from the server/data side, but it can be resolved with the help of efficient server administration.
Role of Three-tier application in web development
Three tiers of DBMS performs several roles in web development; they have a different name but perform similar functions:
- The presentation tier is the web server in web development which provides the user interface to interact with the end user. Usually, it is a web page or a website, for example, an e-commerce site. The content on the web page of an e-commerce site can be static or dynamic; a user can create an account, add products to the cart, and add address and payment details. It is mainly developed by using HTML, CSS, and JavaScript.
- The application server is the middle tier of the application, where the user gives input. Like the above example of an e-commerce site, the application server connects with the main (data) server to return if the product is available or not and checks if the entered pin code is correct. This tier is usually developed using Python, Ruby, or PHP and runs on frameworks like Django, Rails, and ASP.NET.
- The database server or the web development data tier is the web application's back-end tier. It runs on database management software, such as MySQL, Oracle, DB2, or PostgreSQL.