What is Data Abstraction?

Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the un-wanted characteristics of that situation or object.Lets take a person as example and see how that person is abstracted in various situations

  • A doctor sees (abstracts) the person as patient.  The doctor is interested in name, height, weight, age, blood group,  previous or existing diseases etc of a person
  • An employer sees (abstracts) a person as Employee. The employer is interested in name, age,  health, degree of study, work experience etc of a person.  

So, you see that Abstraction is the basis for software development.  Its through abstraction we define the essential aspects of a system.  The process of identifying the abstractions for a given system is called as Modelling  (or object modelling).

In the above example, the doctor may not be interested in characteristics of a person on which the employer is interested in and vice versa.   Both employer and doctor will not be interested in all the characteristics of a person (like the color of dress the person wears on a particular day, the food the person takes, the relatives of the person etc).  But however some elements are common to both doctor and the employer (like name, age, height etc).  This common element gives way to generalization.   Ie, if we eliminate enough details of an abstraction, it become so generalized that it can be applied wide in range of situations.One good example for such a generalization is a cell.  A generalized cell would look like
Cell abstraction..

Though the above generalized cell doesnt look like a brain cell or muscle cell, the above can still be used to represent all cell types that have this common features. 

In real world, there are millions of abstractions possible and many are complex in nature.  The complexities of abstractions are handled by systematically classifying and generalizing the abstractions based on some pre-defined criteria.  This process is known as classification.  Classification builds up a hierarchy and its called as abstract hierarchy. You can see an example of an abstract hierarchy below .

 Object Hierachy

So, we see that abstraction is the basis for object oriented programming.  Abstraction serves as the foundation for determining the classes for a particular system (which is called object model).   But be advised, there is no acid test to decide if the abstraction for a given system is right or wrong. A "person" abstraction for a hospital information system would be different from a person abstraction for a library information system and even with hospital information system, person abstraction may be different for different projects.

Once you have abstracted an object, it can be re-used.  It can be modified to suit other situations.   As a child you learnt Tri-cycle. You used the experience of learning tri-cycle (handle bar control, pedaling) to learn bicycling.  What actually you do to learn bicycling is that you only learn to balance the bicycle while you use the experience of tricycle to use handlebar and pedaling.  The same case applies to abstraction as well.

Though abstraction seems to be a simple concept, it’s a challenging task.  The reasons are

  1.  There are un-limited numbers of possibilities to define an abstraction for a situation. 
  2.  As mentioned earlier, there is no acid test to determine if the abstraction is right or wrong.  You end up discussing, arguing with your counter part that yours is best and his is worst…. He does the same thing…

However, these problems are always addressed as you gain experience (which you can gain by reading more books/articles and doing real time projects) in defining the abstraction. Abstraction by itself is a huge and an interesting concept.  But, I feel that most of the people, who define classes, do it without knowing what an abstraction is. Most of the times they are right.   But doing your work with more knowledge (knowing what you are doing) lets you to enjoy.

 Note: Characteristics of a situation or object may be seen (legs of a table) or unseen (smell of a food), felt or unfelt.   This means that there is no specific definition for characteristics of a situation or object..

Hope this article gives you an idea about Abstraction.   Please feel free to post comments on what do you think about Abstraction.

 

Author: azagappan

Hi.. I am Azagu. I live in Chennai, Tamil Nadu, India. I am a .NET developer. You can reach me at azagappan at gmail.com

79 thoughts on “What is Data Abstraction?”

  1. Want to start your private office arms race right now?

    I just got my own USB rocket launcher 🙂 Awsome thing.

    Plug into your computer and you got a remote controlled office missile launcher with 360 degrees horizontal and 45 degree vertival rotation with a range of more than 6 meters – which gives you a coverage of 113 square meters round your workplace.
    You can get the gadget here: http://tinyurl.com/2qul3c

    Check out the video they have on the page.

    Cheers

    Marko Fando

  2. Great article!

    I get really confused when i think of data abstraction ive been trying to learn the basics for a while now.

    Thanks

    JJ07

  3. Hi,

    From last few days I was searching for a good real time example of data abstraction. But not a single one was satisfactory. Finally I got this article on data abstraction. Now my doubt is cleared about data abstraction. Thanks a lot for such a beautiful knowledge transfer.

    With Regards,
    DJ

  4. Very effective and complete explanation using simple words and no high figh jargon. great article. Thanks a lot , i have been thru dozens of sites, this is the best ever.

  5. hi,

    This is good and sufficient metter for data abstraction.
    i satisfid a lot of with it.
    your exampls of abstraction are very attractive.

    Thank you .

  6. Thank you…I could understand Data Abstraction only after reading your post. I was trying other ways to understand it for sometime now. Worth the visit to this blog.

  7. Why should not one find this at first after searching Google? Its very helpful for a new one who wants to know about Data Abstraction. Thanks……

  8. Yee, this article really helped me, as i have been very confused about data abstraction, but i think you can do more by providing little example for those that may not fully understand by just reading text until they sees some kind of code example, though i`m not that type.

    Good Job

  9. Teri pan da phuda maal lana pan choda kisi kangeri maa kay putter Baghwan kei maa ki kuss maroo Kali mata kay sath rape karooo

  10. Thanks a lot for such, simple and lucid explanations for “Data Abstraction ” . It really helps,
    Thanks again,
    Sanjib Bhattacharyya

  11. Thanks alot! You are a talented mentor! I searched google to know data abstraction like anything. But never got a site like this.

    Thanks alot man! you rock!!

  12. thanks for this awesome comment! very thankful with this brilliant idea concept in data abstraction it helps me a lot understanding it. keep up the good post! thanks..

  13. This is very nice article….. I am little bit confused about concept. but u clear the idea with the help of real time example ie patient and employee….
    thank u….

  14. I am really confuged when any one asked what is data abstraction ,but when i read your blog then i understand what is data abstraction and what is the real time example of data abstraction

    thanks u again

  15. I have gone through so many website from last three to four week….you have explain real time example with logical anwer

    Thanks So Much…

  16. Hats off to you. The way you have explained it, its very easy to understand. I searched lot of websites, but no one could explain this better than you. Knowledge we can get from any where, but teaching is an art, every one cannt do that…..:)

  17. does it means…abstraction is just like defining the characteristics of a class or modelling an object?…by considering only the essentials details we need for constructing a program…am i right?

  18. you should fist give a definicion, then the examples, you like a big text, but te information is too mixed up.

  19. This was a great introduction without being to technical. Very simplistic and practical for the purposes I was looking for

  20. Good post. Simple language efficient conveyance of the concept. Down to earth analogy. Appreciate your efforts for making complex stuff simple for many. Thank you.

  21. simple, logical and practical for the beginners…. shorn of unnecessary technical jargon….. look forward to more such posts

  22. This is the best explanation that I have found. I was confused a lot about it. Now it is clear as water to me.Thank you very much for such a simple explanation.

  23. Good one,working on ooops concept from the last 5 year,but finally got to know whats abstraction is all about.
    Thank a ton.

  24. Kris Lim and Guan Li are the power couple at Rancho Bernardo High SChool. They have done so much to break stereotypes and have furthered the gay cause. I respect.

  25. I keep listening to the news update lecture about getting boundless online grant applications so I have been looking around for the best site to get one. Could you advise me please, where could i acquire some?

Leave a reply to Sukumar Cancel reply