What is data Abstraction in DBMS?

  • Have you ever wondered why a single website or an application shows different information, forms and data to different people?
  • Do the developers write multiple codes?
  • How does it happen?

Well, the answer to all these questions is Data Abstraction in DBMS. With the help of data abstraction, developers customize what you can view and what other users can view on the website or application.

If you are a budding developer, data abstraction is one such concept that you must not miss out on.

Therefore, we have come up with a complete guide on what is data abstraction in DBMS, how to use it and why you need it.

What Is Data Abstraction?

Data abstraction is a process to hide irrelevant data from the user or system. The main motive behind this process is to provide different views and implement data independence. Data abstraction is generally used to boost the security of the data and makes it simpler to work with complex databases.

The main purpose of using data abstraction is to divide the given problem into smaller subproblems so as to easily manage the data. It keeps irrelevant data or information hidden from the user to make things and applications more user-friendly.

What Are The Levels Of Data Abstraction In DBMS?

Apart from making complex data structures easier, major goal of using data abstraction is to increase the efficiency of the system. To achieve this efficiency, developers use three types of abstractions which include:

  • Internal Schema
  • Logical Level
  • View Level

Here, we will discuss each of these methods in detail.

Internal Schema

This level of abstraction is also called the physical level in which the exact location of the given data is determined. In simpler terms, this level explains the location where actual data is present in the system.

This includes multiple things including; the drive in which data will be stored, the location of the storage, the number of data fragments and other things that the database administrator decides.

It depends on the administrators to decide the distribution of the data. However, when you view the data, it will be available in the table file and stored in the form of a file in your system. It is the administrator’s choice in which way he wishes to use the data present at this level.

Logical Level

Another level of data abstraction in DBMS is the intermediate and logical level which explains the type of data present in the system. This level is called the conceptual level which explains the relationship between the data present in the table.

The primary function of this level is to describe the whole data as it will showcase which new tables will be made and what will be the relationship between those tables.

In this method, data complexity is less as compared to the physical method. Generally, this is the most used level by developers and administrators. Simply, this level consists of all the attributes and fields present in the database.

View Level

Now the last level of data abstraction is the View level. This level generally deals with how the user interacts with the given database. The view level can be divided into different views which helps the administrator to provide different views to different users. At this level, developers focus more on simplifying interaction and implementing views on the database.

Advantages Of Data Abstraction

Data abstraction is used for multiple purposes. Some of these include:

  • With data abstraction, the chances of code duplication are reduced.
  • It makes it easy for the developers to reuse the code whenever and wherever necessary.
  • It helps you avoid low-level coding.
  • Other than this, with data abstraction, you can make changes to an internal class independently without making any changes to the existing user.
  • Data abstraction also makes your system secure as you will only provide the user with the necessary details.

Disadvantages Of Data Abstraction

Data abstraction also comes with the following limitations:

  • Because of data abstraction, some sort of confusion can be created at multiple levels of the database. This may make it difficult for the developers to implement data abstraction.
  • In case there is an additional layer added to the database, the code becomes complex.

Data Abstraction Examples

By far, you may have got an idea of what data abstraction in DBMS is and how it works, here let’s take a look at how the concept is used in the real world.

Clicking Photos On A Mobile

When you click a picture on the smartphone, you switch the camera to the front or rear side depending on your requirements. With the help of data abstraction, you will only see the side of the camera that you need to see. Moreover, it allows you to ensure that you use the camera angles you need.

College or School Website

When you use a college or school website, you see what is required. For example, if you are a student, you will be able to see the timetable, marks, exam date sheet and other related details. However, as a teacher, you may have permission to add marks, and date sheets, change the timetable, or mark your attendance. So, as per your role in the college, the developer can decide what data you can see.

Now that we are discussing DBMS, another important topic related to databases is recursion in the data structure. In this process, the specified function calls itself again and again until the specified condition is fulfilled.

The given function that calls itself repeatedly is called the recursive function. This method is usually used when a larger problem has to be solved in different smaller terms. You may need to use it in data abstraction to divide the given database into smaller databases to manage it easily and more efficiently.

Conclusion

Data abstraction is an important database management concept that every programmer must be familiar with. The process is done to increase the security and efficiency of the system.

However, there are three different levels of data abstraction in DBMS that a developer has to deal with depending on the complexity of the database.

Comments are closed