Alex Rivera | Logout

What does "data abstraction" exactly mean?

Asked 2010-09-03T10:36:10.990
15

What does data abstraction refer to? Please provide real life examples alongwith.

Edit
Report

1 Answer

12

Data abstraction is any device that allows you to treat data as humans encounter it rather than as it is stored on machine.

At the lowest level, all primitive data types are abstractions -- as programmers, we don't usually have to deal with data at the bit level (which is how it is ultimately stored) but as integers, floating point numbers, characters, etc.

We then add layers onto that abstraction -- maybe two integers represents a Point, or we and enumerations to represent the months of the year, days of the week, etc.

With each abstraction layer, we move further from the machine and (hopefully) closer to human understanding of the data. This can extract a performance penalty -- it may not always be the case that points can be most efficiently represented by two integers. This is compensated for by the shorter development (and maintenance) time when abstractions are used.

answered 2010-09-03T16:13:12.510

Your Answer