Pages

Tuesday, 7 September 2021

DBMS – Architecture & Levels of Data Abstraction

The design of a DBMS depends on its architecture. It can be centralized or decentralized or hierarchical. The architecture of a DBMS can be  seen  as  either single tier or multi-tier. An n-tier architecture  divides  the  whole  system  into related  but  independent n modules,  which  can  be  independently   modified, altered, changed, or replaced.

1-tier architecture:
In 1-tier architecture, the DBMS is the only entity where the user directly sits on the DBMS and uses it. Any changes done here will directly be done on the DBMS itself. It does not provide handy  tools for end-users. Database designers and programmers normally prefer to use single-tier architecture. 

2-tier  architecture:
Two tier architecture is similar to a basic client-server model. The application at the client end directly communicates with the database at the server side. API’s like ODBC(Open Data Base Connectivity),JDBC(Java Data Base Connectivity) are used for this interaction.
The server side is responsible for providing query processing and transaction management functionalities. On the client side, the user interfaces and application programs are run.
The application on the client side establishes a connection with the server side in order to communicate with the DBMS. An advantage of this type is that maintenance and understanding is easier, compatible with existing systems. However this model gives poor performance when there are a large number of users.

3-tier  architecture:
In this type, there is another layer between the client and the server. The client does not directly communicate with the server. Instead, it interacts with an application server which further communicates with the database system and then the query processing and transaction management takes place.
This intermediate layer acts as a medium for exchange of partially processed data between server and client. This type of architecture is used in case of large web applications.

Levels of Data Abstraction (or) Degrees of Data Abstraction:
In DBMS the data can be abstracted in 3 levels. The goal of Data Abstraction in DBMS is to separate the users request and the physical storage of data in database. The data abstracted at each of these levels is described by schema.

Schema: The overall design of the database is to store the information is called as database schema.

Data independence: The ability to modify a schema definition in one level without effecting a schema definition in higher level is called data independence

Two kinds of data independence 
1.Logical data independence :The ability to change logical schema without changing external schema or application program is called logical data independence 
2.Physical data independence: The ability to change Physical schema without changing logical schema is called physical data independence 

ANSI-SPARC Architecture(American National Standards Institute-Standards Planning And Requirements Committee): 
       It is an abstract design standard for a Database Management System (DBMS), first proposed in 1975.
       The ANSI-SPARC model however never became a formal standard. No mainstream DBMS systems are fully based on it (they tend not  to  exhibit  full physical independence or to prevent direct  user  access  to  the  conceptual  level), but the idea of logical data independence is widely adopted.

Levels of Data Abstraction:
      Database
systems  are  made-up  of  complex  data  structures.  To  ease  the user interaction with  database,  the  developers  hide internal  irrelevant  details from users. This process of hiding irrelevant details from user is called data abstraction.

The database has 3 levels as shown in the diagram below

1.    Internal/Physical Level

2.    Conceptual/Logical Level

3.    External/View Level   
         
These three levels provide data abstraction means hide the low level complexities from end users. A database system should be efficient in performance and convenient in use.

Using these three levels, it is possible to use complex structures at internal level for efficient operations and to provide  simpler  convenient  interface  at external level
Internal level or Physical layer:
  • This is the lowest level of data abstraction.
  • It describes how the data are actually stored on storage devices.
  • It is also known as physical level.
  • It provides internal view of physical storage of data.
  • It deals with complex low level data structures, file structures and access methods in detail.
  • It also deals with Data Compression and Encryption techniques, if used.

Conceptual level or logical level:
  • This is the next higher level than internal level of data abstraction.
  • It describes What data are stored in the database and What relationships exist among those data.
  • It is also known as Logical level.
  • It hides low level complexities of physical storage.
  • Database administrator and designers work at this level to determine what data to keep in database.
  • Application developers also work on this level.
External level or view level:
  • This is the highest level of data abstraction.
  • It describes only part of the entire database that an end user concern.
  • It is also known as an view level.
  • End users need to access only part of the database rather than entire database.
  • Different user need different views of database. And so, there can be many view level abstractions of the same database

No comments:

Post a Comment

Conflict Serializability

Find out conflict serializability for the given transactions T1 T2 T3 R(X)     ...