View of Data


   A database system is a collection of interrelated data and a set of programs that allow users to access and modify these data. A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained.
1.3.1 Data Abstraction
For the system to be usable, it must retrieve data efficiently. The need for efficiency has led designers to use complex data structures to represent data in the database. Since many database-system users are not computer trained, developers hide the complexity from users through several levels of abstraction, to simplify users’ interactions with the system:
Physical level. The lowest level of abstraction describes how the data are ac- tually stored. The physical level describes complex low-level data structures in detail.
Logical level. The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. The logical level thus describes the entire database in terms of a small number of relatively simple structures. Although implementation of the simple struc- tures at the logical level may involve complex physical-level structures, the user of the logical level does not need to be aware of this complexity. This is referred to as physical data independence. Database administrators, who must decide what information to keep in the database, use the logical level of abstraction.
View level. The highest level of abstraction describes only part of the entire database. Even though the logical level uses simpler structures, complexity remains because of the variety of information stored in a large database. Many users of the database system do not need all this information; instead, they need to access only a part of the database. The view level of abstraction exists to simplify their interaction with the system. The system may provide many views for the same database.
Figure 1.1 shows the relationship among the three levels of abstraction.
An analogy to the concept of data types in programming languages may clarify the distinction among levels of abstraction. Many high-level programming 
languages support the notion of a structured type. For example, we may describe
a record as follows:1
        type instructor = record
        ID : char (5);
       name : char (20);
       end;
This code defines a new record type called instructor with four fields. Each field has a name and a type associated with it. A university organization may have several such record types, including
 At the physical level, an instructor, department, or student record can be de- scribed as a block of consecutive storage locations. The compiler hides this level of detail from programmers. Similarly, the database system hides many of the lowest-level storage details from database programmers. Database administra- tors, on the other hand, may be aware of certain details of the physical organiza- tion of the data.
 

Post a Comment