UNIT I RELATIONAL DATABASES

1.2 Views Of Data

 The view level provides the “view of data” to the users and hides the irrelevant details such as data relationship, database schema, constraints, security etc from the user.

To fully understand the view of data, you must have a basic knowledge of data abstraction and instance & schema. Refer these two tutorials to learn them in detail.

  1. Data abstraction:Database systems are made-up of complex data structures. To ease the user interaction with database, the developers hide internal irrelevant details from users. This process of hiding irrelevant details from user is called data abstraction.
  2. Instance and schema: Design of a database is called the schema. Schema is of three types: Physical schema, logical schema and view schema. The data stored in database at a particular moment of time is called instance of database. Database schema defines the variable declarations in tables that belong to a particular database; the value of these variables at a moment of time is called the instance of that database.

Data Abstraction 

          Database systems are made-up of complex data structures. To ease the user           interaction with database, the developers hide internal irrelevant details from             users. 
         
         This process of hiding irrelevant details from user is called data abstraction
         The term “irrelevant” used here with respect to the user, it doesn’t mean that             the hidden           data is not relevant with regard to the whole database. It                 just   means that the user is not concerned about that data.


For example: When you are booking a train ticket, you are not concerned how data is processing at the back end when you click “book ticket”, what processes are happening when you are doing online payments. You are just concerned about the message that pops up when your ticket is successfully booked. This doesn’t mean that the process happening at the back end is not relevant, it just means that you as a user are not concerned what is happening in the database.

Three levels of abstraction

                                      

Physical level: This is the lowest level of data abstraction. It describes how data is actually stored in database. You can get the complex data structure details at this level.

Logical level: This is the middle level of 3-level data abstraction architecture. It describes what data is stored in database.

View level: Highest level of data abstraction. This level describes the user interaction with database system.

Example: Let’s say we are storing customer information in a customer table. At physical level these records can be described as blocks of storage (bytes, gigabytes, terabytes etc.) in memory. These details are often hidden from the programmers.

At the logical level these records can be described as fields and attributes along with their data types, their relationship among each other can be logically implemented. The programmers generally work at this level because they are aware of such things about database systems.

At view level, user just interact with system with the help of GUI and enter the details at the screen, they are not aware of how the data is stored and what data is stored; such details are hidden from them.

Instance and schema

         Definition of schema: Design of a database is called the schema. For example: An employee table in database exists with the following attributes:
EMP_NAME  EMP_ID   EMP_ADDRESS  EMP_CONTACT
--------  ------   -----------  -----------

This is the schema of the employee table. Schema defines the attributes of tables in the database. Schema is of three types: Physical schema, logical schema and view schema.

  • Schema represents the logical view of the database. It helps you understand what data needs to go where.
  • Schema can be represented by a diagram as shown below.
  • Schema helps the database users to understand the relationship between data. This helps in efficiently performing operations on database such as insert, update, delete, search etc.

In the following diagram, we have a schema that shows the relationship between three tables: Course, Student and Section. The diagram only shows the design of the database, it doesn’t show the data present in those tables. Schema is only a structural view(design) of a database as shown in the diagram below.
DBMS Schema

The design of a database at physical level is called physical schema, how the data stored in blocks of storage is described at this level.

Design of database at logical level is called logical schema, programmers and database administrators work at this level, at this level data can be described as certain types of data records gets stored in data structures, however the internal details such as implementation of data structure is hidden at this level (available at physical level).

Design of database at view level is called view schema. This generally describes end user interaction with database systems.


Comments

Popular posts from this blog

CS3492 Database Management Systems Syllabus

UNIT I RELATIONAL DATABASES

UNIT I WEBSITE BASICS, HTML 5, CSS 3, WEB 2.0