Architecture of DBMS
The DBMS architecture describes how data in the database are viewed by the users. It is not concerned with how the data are handled and processed by the DBMS. In this architecture, the overall database description can be defined at three levels namely, internal, conceptual and external levels and, thus, named three-level DBMS architecture (Figure below). The three levels are as follows:
Internal level:
It is the lowest level of data abstraction that deals with the physical representation of the database on the computer and, thus, is also known as the physical level. It describes how the data are physically stored and organized on the storage medium.
Conceptual level:
This level of abstraction deals with the logical structure of the entire database and, thus, is also known as the logical level. It describes what data are stored in the database, the relationships among the data and a complete view of the user's requirements without any concern for the physical implementation.
External level:
It is the highest level of abstraction that deals with the user's view of the database and, thus, is also known as the view level. It permits users to access data in a way that is customized according to their needs, so that the same data can be seen by different users in different ways, at the same time. In this way, it provides a powerful and flexible security mechanism by hiding the parts of the database from certain users as the user is not aware of the existence of any attributes that are missing from the view.
These three levels are used to describe the schema of the database at various levels. Thus, the three-level architecture is also known as three-schema architecture.
Advantage of three-schema architecture
The main advantage of three-schema architecture is that it provides data independence. Data independence is the ability to change the schema at one level of the database system without having to change the schema at the other levels. The database users are provided with an abstract view of the data by hiding certain details of how data are physically stored. This enables the users to manipulate the data without worrying about where they are located or how they are actually stored.
Mapping in three-schema architecture.
In three-schema architecture, each user group refers only to its own external view. Whenever a user specifies a request to generate a new external view, the DBMS must transform the request specified at the external level into a request at the conceptual level, and then into a request at the physical level. If the user requests for data retrieval, the data extracted from the database must be presented according to the need of the user. This process of transforming the requests and results between various levels of DBMS architecture is known as mapping.
Two-tier architecture in DBMS
There are two approaches to implement client/server architecture. In the first approach, the user interface and application programs are placed on the client side and the database system on the server side. This architecture is called two-tier architecture. The application programs that reside at the client side invoke the DBMS at the server side. The application program interface standards like Open Database Connectivity (ODBC) and Java Database Connectivity (JDBC) are used for interaction between the client and the server. Figure below shows two-tier architecture.
The second approach is the three-tier architecture
Three-tier architecture
Other than two-tier architecture approach there is another approach available that is three-tier architecture, which is used for Web-based applications. It adds an intermediate layer known as the application server (or Web server) between the client and the database server. The client communicates with the application server, which in turn communicates with the database server. The application server stores the business rules (procedures and constraints) used for accessing data from the database server. It checks the client's credentials before forwarding a request to the database server. When a client requests for information, the application server accepts the request, processes it and sends corresponding database commands to the database server. The database server sends the result back to the application server, which is converted into GUI format and presented to the client. Figure below shows the three-tier architecture.
No comments:
Post a Comment