Often when you visit a website, you might notice what you view can differ from what another person views. For instance, if you login to a shopping website and enter your details, you can only view what orders you have placed rather than what someone else has paid, isn’t it? This is because details regarding who is manufacturing the dress, their name, etc., are unnecessary and so those get hidden. But how is it done though?
Well, thanks to data abstraction in DBMS, data gets to be hidden if it's unnecessary.
Data abstraction is an approach implied to hide unnecessary data from the database that is widely accessed by many users. Data abstraction is an important factor when it comes to problem solving in the computer field.
In this blog, we will have a clear look into what data abstraction means, what are its types and perks.
Data abstraction in DBMS
Data abstraction helps users to hide certain details that are irrelevant. For eg: When we send an email to a client, there are certain aspects that get hidden such as where the email was sent from (location) and such. Why is this happening though? This is because the location is an unnecessary information for the client and so it gets hidden.
This process of hiding details that are of no use is called data abstraction in DBMS.
In the data abstraction, there are three levels that help in achieving data independence.
What is data independence?
The main purpose of data abstraction is to bring in data independence which will save a lot of time. Data independence helps in modifying data without influencing any program or having to write a program entirely. In this method, the data is first kept aside from programs. Gets altered and then is sent back to its original place. In this way, the modification won’t affect any application. In the data independence, there are two significant types, namely:
- Physical level: For the purpose of optimization, data independence will alter data without affecting logical level.
- Logical level: Logical level aids in changing data without impacting external schema.
Let us now take a close look at the different levels of data abstraction that also carry similar level names but with different purposes.
Levels of Data Abstraction
Data abstraction basically runs on three levels that invokes data independence. The three levels are:
View level is also considered as an external schema. This level allows the website to show the data to the user as requested. For eg: When we visit our college website and login to the student portal, we can use functions like attendance, credits, personal details and such. But a professor or teacher can see a different version of the same student’s profile, where they’ll be able to update marks, write remarks, etc.
Basically, both the student and the professor will be accessing the same website and the same portal, but they'll be shown only what they have to be shown as planned by the college.
This signifies that the data abstraction is at its view level because it helps to put a limitation over what someone can be able to see.
In this level we get to find how the information is arranged and saved. To make this possible, we will employ various data models like hierarchical model, network model, and such. Let’s understand this with this example. Imagine we’re using the relational model to store data. Now we have to store the data of a teacher. We will create columns with the teacher’s name, age, and such. Once we create it, we will define it.
Now when these are implemented, there are other sub aspects of a teacher such as the number of classes to take, to be defined right?
Those sub-aspects will be defined at the conceptual level which is also known as logical level. We basically can call the conceptual level of data abstraction as the blueprint of the entire website that helps the users.
Physical level exactly shows where the data is stored. Through the physical level, we can know where the data is kept, how it is segregated, where it should later get saved and much more. These are all made possible due to the database administrators (DBA) and they plan on whether the information that is stored must get distributed or just centralized.
In the view level, we can see the data that is applied to be shown whereas in the physical level, we can see the whole of the data and its location.
Pros and cons of data abstraction in DBMS
Data abstraction is a coding concept that is used everywhere around us. Even when we go to the ATM to withdraw money, our crucial bank details get hidden for security purposes which is a factor of data abstraction as well.
While data abstraction brings in so many benefits, there are also certain drawbacks. Let us first look at its advantages, before moving on to the limitations.
- Eradicating low-level coding is possible due to the support given by data abstraction.
- Code duplication gets aided and it is maintained well.
- Reusability factor also gets boosted
- There won’t be any effect on the user when a class’ internal process gets altered.
- Security of any confidential data can be highly supported by data abstraction.
Apart from these benefits, there are some drawbacks that make data abstraction pretty complex.
- As it can render difficulties, developers might get confused.
- When a code gets an additional layer, the navigation process becomes complicated in data abstraction.
That’s a wrap! We are glad you’ve read our blog and reached the final part. Note that, DBMS is a concept that gets often enquired about in interviews. From data abstraction to cardinality in DBMS, many questions can possibly be covered.
Hopefully, you garnered enough information regarding data abstraction in DBMS through our article. If you’re asked a question about data abstraction, we believe you’ll easily ace it. Anyway, all the best!
No comments yet
Sign In / Sign Up