Friday, November 28, 2008

DATA ABSTRACTION and ABSTRACT DATA TYPE(ADT)

Q. What is abstract data type (ADT)?

Ans: - An abstraction that describes a set of objects in terms of hidden data and operations on that data is called as ADT.
We can define an ADT as a mathematical model with a collection of operations defined on that model without concerning how the operations are implemented.
In defining an ADT we are not concerned with the time and space complexity as these are implementation issues.
E.g.:- each stack, queue is an ADT because while using it we are not bothering about its implantation as it can be implemented by array, structure, or linked list.


Q. What is data abstraction or abstract view of data?

Ans: - Data abstraction is an act of hiding certain details of how the data are stored and maintained. This is an important feature of database because users have not to worried about technical and implementations aspects. Since many database-system users are not computer trained, developers hide the complexity through various levels of abstractions.


Q. What are the various levels of data abstractions?
Ans:- There are three levels of data abstractions: -

(a)Physical level abstractions: -
This is the lowest level of abstraction. It describes how the data is actually stored and access path for the database and interacts with the physical hard disk. Function of physical layer is to provide data retrieve and data storage methodology. For example creating a cluster and non clustering index.

(b)Logical or conceptual level abstraction: -
This layer describes what data are stored in the database and what the relationship among those data is. Basic function of this layer is to provide data declaration and techniques such as creating tables and relating tables.

(c) View level: -
This layer is also known as external level. View layer basically deals with providing a copy of original database for every user to access the database. In a database design there is only one physical and conceptual layer but there can be many number of views level.