2 tier architecture vs 3 tier architecture | Difference between 2 tier architecture and 3 tier architecture
This page compares 2 tier architecture vs 3 tier architecture and mentions difference between 2 tier architecture and 3 tier architecture. It mentions advantages and disadvantages of 2 tier architecture and 3 tier architecture. Link to basics of client server architecture is also mentioned.
2 tier architecture
Following are the features of 2 tier architecture.
• It is Client Server Architecture.
• There will be direct communication between entities.
• It runs faster and it is tightly coupled between client applications and data source.
• It is divided into two parts viz. client application (known as client tier) and database (known as data tier).
• On the client application side, the code is written for saving the data in the SQL server database.
Advantages and disadvantages of 2 tier architecture
Following are the advantages of 2 tier architecture.
• It is easy to maintain.
• The modification is very easy.
• Communication is very fast.
Following are the disadvantages of 2 tier architecture.
• Performance degrades when number of users increase.
• It is very cost effective.
3 tier architecture
Following are the features of 3 tier architecture.
• It is used in web based applications.
• It has three layers viz. client layer, business layer and data layer.
• Client layer contains UI (User Interface) part. This layer takes input and gives output to the user.
• Business layer is the interface between client and data layers. All the logic such as validation, calculation, data related operations exist at business layer. It helps communication fast between client and data layers.
• Actual database exist at data layer. It contains methods to connect with database. The operations such as insert, delete, updatem get data lies here.
Advantages of 3 tier architecture
Following are the advantages of 3 tier architecture.
• It is scalable as each tier can scale in horizontal direction.
• Better re-use is possible.
• Offers higher flexibility as far as configuration and platform deployment is concerned.
• It improves data integrity.
• It offers higher level of security as client does not have access to the database directly.
• It is easier to maintain and do any modification.
• Offers good performance as presentation tier does caching operations. This offers better network utilization and load is reduced on application tier and data tiers.
Refer Client Server Architecture to know more on client and server definitions as well as types of client server architecture.