View of Data in DBMS

The major goal of a database system is to provide user the abstract view of data, that is, the system hides certain details of how the data is stored and accessed. 

1.    Data Abstraction: 

To simply the user interaction with the system, the developers hide the system complexity through several levels of abstraction:

Physical level: This is the lowest level of abstraction. It hides from the user how the data are actually stored. It also describes the complex low level data structure in detail.

Logical level: This is next higher level of abstraction. It describes what data are stored in database and what relationship exists among these data. It thus describes the database in simple structure. 

View level: This is the highest level of abstraction. The system may provide many views of the same database. The view level describes only a part of the entire database to simplify the interaction with the user.

Figure 1: The three levels of data abstraction

For example, in Pascal – like language, we may declare a record as follows:

type customer = record                                

Customer_id : string;

Customer_name : string;

Customer_city : string;

  end;              

This code defines a new record type called customer with three fields. Each field has a name and a type associated with it. Similarly, a banking enterprise may be record as

Account, with field account_number and account_balance

Employee, with field employee_name and employee_salary

At the physical level, the customer, account and employee record can be described as block of consecutive storage locations (for example, words and bytes). The language compiler hides this level of details from programmers. Similarly, the database system hides many lowest – level details from database programmers.

At the logical level, each record is described by a type of definition. Programmers and database administrators usually work at this level of abstraction.

At the view level, several views of the database are defined that are visible to the database users. Computer users also see a set of application programs that hide the details of data types. It also provides security mechanism to prevent users from accessing certain part of the database.

2.    Instances and Schemas

The collection of information stored in the database at a particular time is known as instance of the database. The overall design of the database is known as schema of the database. Schemas are changed infrequently.

A database schema corresponds to the declaration of variables along with the type definition in program. The value of variables at a point in time corresponds to the instance of the database schema.

Database systems have several schemas, separated according to the abstraction levels. The physical schema describes the design of database at the physical level, while the logical schema describes the design of database at the logical level. The database schema at the view level, also called as subschemas, describes different views of the database.

Comments

Popular posts from this blog

A university registrar’s office maintains data about the following entities: (a) courses, including number, title, credits, syllabus, and prerequisites; (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; (c) students, including student-id, name, and program; and (d) instructors, including identification number, name, department, and title. Further, the enrolment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modelled. Construct an E-R diagram for the registrar’s office. Document all assumptions that you make about the mapping constraints.

Consider a database used to record the marks that students get in different exams of different course offerings.