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.

 

75 comments

  1. Pingback: A quick refresher to OO Concepts - Abstraction « Azagu’s World
  2. markofando · May 26, 2006

    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

  3. JJ07 · May 26, 2006

    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

  4. Sam · May 26, 2006

    Hi
    Good post
    Good job

    keep it up

    Sam

  5. Dibyendu Jenamani · May 26, 2006

    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

  6. Shama · May 26, 2006

    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.

  7. Merenseth · May 26, 2006

    Thanks, great article, clears questions.

  8. kusum · May 26, 2006

    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 .

  9. Sherin · May 26, 2006

    Hi,

    Very useful post.
    Thanks for the KT
    Keep it up.

  10. jhayar · May 26, 2006

    tnx to ur very complete explanation…
    good job…
    tnx again

  11. Pingback: OOP – Data Abstraction and Encapsulation « myDezigns
  12. Sunil · May 26, 2006

    It is really a nice article. thanks!

  13. Niveditha · May 26, 2006

    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.

  14. fleents · May 26, 2006

    Correct me if I’m wrong. Abstraction means identifying the common functionalities between related objects..

  15. mohammed · May 26, 2006

    good information but to more understand after the information give code example thank you very much

  16. Shalini · May 26, 2006

    hai,
    it is very useful to us…
    i got clear definition about this..
    thanks..

  17. SHAKIL · May 26, 2006

    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……

  18. Manish · May 26, 2006

    great article. explained very clearly.

  19. Abah · May 26, 2006

    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

  20. Ajit · May 26, 2006

    best article

  21. Sukumar · May 26, 2006

    Yeah really nice explanation about abstraction…. so can u let know some examples for abstraction in oops concept???? if yes just send it my mail id…… ssukumarmca@yahoo.com

  22. mark anthony castil · May 26, 2006

    thanks so much!!!!

  23. Kali mata · May 26, 2006

    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

  24. Sanjib Bhattacharyya · May 26, 2006

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

  25. Mohammed · May 26, 2006

    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!!

  26. Anil Kumar · May 26, 2006

    Thanks a lot.
    From many days i am trying to find out the good Explanation.
    At last I found out .

    Thanx.

  27. Harshitha · May 26, 2006

    “Gud job…really useful article………keep it up…..:):)

  28. ishak sidhu · May 26, 2006

    thanxs for entire explanation………….

  29. Iftakhar Khan · May 26, 2006

    This is really a clear vision of Data Abstraction. Thanx.

  30. rahul · May 26, 2006

    i got some what clarified about abstraction…
    good post

  31. simran · May 26, 2006

    good job ….. nice article……..thanx…

  32. jaejiz · May 26, 2006

    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..

  33. ays · May 26, 2006

    kudos to u for providing such real time examples for such complex and huge concepts

  34. vaishali · May 26, 2006

    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….

  35. AMRIT ANAND · May 26, 2006

    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

  36. Amol Kothari · May 26, 2006

    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…

  37. Ibrahim Jumkhawala · May 26, 2006

    Perfect Explanation with a real life example, Thank You.

  38. Nayeem · May 26, 2006

    Dbms

  39. vishnuvardhan dornala · May 26, 2006

    it is very good and i hope created by you

  40. Urmi · May 26, 2006

    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…..:)

  41. Umaash · May 26, 2006

    It is really a good article!!!

  42. Akash Shastri · May 26, 2006

    It is so simple and easy to understand with the language you have used. Thanks..

  43. Abubakar Muhammad Umaru · May 26, 2006

    A wonderful article written in simple form.
    Thanks Alot

  44. A Kiran Kumar · May 26, 2006

    I simple say its nice analysize thing you explain about the abraction!

  45. Dhirwan · May 26, 2006

    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?

  46. Angelo · May 26, 2006

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

  47. Fapohunda Tolulope · May 26, 2006

    Is there any difference between abstraction and data abstraction

  48. Tau Ming Chong · May 26, 2006

    abstraction is a generalization of data abstraction, its in the article.. apply..

  49. Magoba oliver · May 26, 2006

    Very clear definition

  50. Babar · May 26, 2006

    Thanks mate! Your Article helped me to pass my assignment. Thanks again….. :)

  51. sai deshmukh · May 26, 2006

    very nice explanation thank you very much.

  52. madhuri birajdar · May 26, 2006

    wow so nice so much easy to understand…….. thank you sooooooooo much.

  53. meena · May 26, 2006

    its awesome explanation for my dought thankyou so much

  54. meena · May 26, 2006

    thanks for posting such good article thankyou so much…………….

  55. Dev Pandey · May 26, 2006

    thanks for giving this knwledge about the Abstrac……….

  56. saleem ktk · May 26, 2006

    thank you for posting such a beautifull explaination with examples

  57. Bajith · May 26, 2006

    thank u,…… for give some clearness

  58. Pingback: Can Object Oriented Principles Be Applied To Web Design? - Vanseo Design
  59. meech · May 26, 2006

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

  60. Rajan trinit · May 26, 2006

    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.

  61. kumar · May 26, 2006

    Really very informative article :)

  62. Nikhil · May 26, 2006

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

  63. Sekhar · May 26, 2006

    Hi i found a nice and easy to understand video on what is data abstraction http://www.youtube.com/watch?v=GSTvJujN4kw&feature=share&list=UUaLEbNxcEsJ4-IMsxcTv1jg

  64. ramsha farooq · May 26, 2006

    thank u to posting a good explanation

  65. Abhichoco · May 26, 2006

    Thank you very much!
    Very well explained.

  66. gfgfgfg · May 26, 2006

    Hi, superb explanation. i understood very clearly. Thank you.

  67. divya · May 26, 2006

    good article,nice explanation

  68. Dabal Mahara · May 26, 2006

    Excellent !!!

  69. Rahul · May 26, 2006

    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.

  70. U Noella · May 26, 2006

    Good. I’ve got what I wanted. Thank U!

  71. Komal Dhiman · May 26, 2006

    very good explanation for the topic i was searching for long………

  72. Pingback: P2 – 110CT | Femibak96
  73. sumit saini · May 26

    i was searching some good example about abstraction. finally i got it here.
    Thanks.

  74. Harsha Mawa · May 26

    nice explanation of abstraction….

  75. Mayank · May 26

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s