📘 DBMS – View of Data, Data Abstraction & Data Independence
📑 Table of Contents
📌 DBMS & Database Definition
Database: A database is a collection of interrelated data and a set of programs that allow users to access and modify data.
DBMS: Database Management System is a software system that allows users to define, create, maintain, and control access to databases efficiently.
The major purpose of a database system is to provide users with an abstract view of the system, hiding details of how data is stored and maintained. Complexity should be hidden from users.
📌 View of Data
The View of Data refers to how data is perceived or accessed by different users. It represents the organization and presentation of data at different levels.
- Physical View: How data is stored on storage devices.
- Logical View: How data is logically organized (tables, relationships).
- External/View Level: Specific view for a group of users or applications.
Importance: Provides security, simplifies interaction, and shows only relevant data.
💡 Data Abstraction
Data Abstraction is the process of hiding internal details and showing only relevant information to the user. It helps simplify user interaction with complex databases.
📊 Levels of Data Abstraction
- Physical Level: Lowest level of abstraction. Describes how data is stored internally (e.g., index, B-tree, hashing, storage blocks).
- Conceptual/Logical Level: Middle level. Describes what data is stored and relationships among data. Managed by DB Administrator.
- View/External Level: Highest level. Shows part of database for specific users. E.g., bank tellers see customer accounts but not payroll data.
🔑 Data Independence
Data Independence is the ability to change schema at one level without affecting higher levels:
- Logical Data Independence: Changes in logical schema (tables, attributes) do not affect external views.
- Physical Data Independence: Changes in physical storage (file structures, indexes) do not affect logical schema.
Importance: Reduces maintenance, ensures users and applications are unaffected by internal changes.
🎯 Example
Consider a bank database:
- Customer: cust_id, cust_name, cust_street, cust_city
- Account: acc_num, balance
- Employee: emp_name, salary
At Physical Level: records stored as blocks in memory or disk.
At Logical Level: described using record type definitions:
type customer = record cust_id : string cust_name : string cust_street : string cust_city : string end;
At View Level: Applications hide data type details, users see only relevant info.
✍️ Exam Tips / Possible Questions
- Define DBMS and Database.
- Explain purpose of DBMS in 3–4 points.
- Define View of Data with levels and examples.
- Define Data Abstraction and levels (Physical, Logical, View).
- Define Data Independence with Logical & Physical types.
- Possible Questions:
- Define View of Data with example.
- Explain Data Abstraction and its levels.
- Explain Data Independence with examples.