📜  两层和三层数据库体系结构之间的区别

📅  最后修改于: 2021-08-27 07:29:25             🧑  作者: Mango

1.两层数据库架构–
在两层中,应用程序逻辑要么埋在客户端的用户界面内,要么埋在服务器上的数据库内(或两者)。对于两层客户端/服务器体系结构,用户系统界面通常位于用户的桌面环境中,而数据库管理服务通常位于服务器中,该服务器是为许多客户端提供服务的功能更强大的机器。

2.三层数据库架构–
在三层中,应用程序逻辑或流程位于中间层,与数据和用户界面分开。三层系统具有更高的可扩展性,健壮性和灵活性。此外,他们可以集成来自多个来源的数据。在三层体系结构中,在用户系统界面客户端环境和数据库管理服务器环境之间添加了中间层。有多种实现此中间层的方法,例如事务处理监视器,消息服务器或应用程序服务器。两层和三层数据库体系结构之间的区别

S.NO Two-Tier Database Architecture Three-Tier Database Architecture
1 It is a Client-Server Architecture. It is a Web-based application.
2 In two-tier, the application logic is either buried inside the user interface on the client or within the database on the server (or both). In three-tier, the application logic or process resides in the middle-tier, it is separated from the data and the user interface.
3 Two-tier architecture consists of two layers : Client Tier and Database (Data Tier). Three-tier architecture consists of three layers : Client Layer, Business Layer and Data Layer.
4 It is easy to build and maintain. It is complex to build and maintain.
5 Two-tier architecture runs slower. Three-tier architecture runs faster.
6 It is less secured as client can communicate with database directly. It is secured as client is not allowed to communicate with database directly.
7 It results in performance loss whenever the users increase rapidly. It results in performance loss whenever the system is run on Internet but gives more performance than two-tier architecture.
8 Example – Contact Management System created using MS-Access or Railway Reservation System, etc. Example – Designing registration form which contains text box, label, button or a large website on the Internet, etc.