←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Three-Schema Architecture, Data Independence & Role of DBA

Study material and explanations for Unit 1

Three-Schema Architecture, Data Independence, and Role of the DBA

Introduction: Why Do We Need Abstraction in Databases?

A database stored on a server’s hard drive consists of complex byte offsets, binary disk blocks, compression trees, and B-Tree indexes. If an ordinary banking clerk or college student had to know raw disk sector addresses just to check a balance, nobody could use computers!

To hide this low-level physical complexity from end users, the ANSI/SPARC (American National Standards Institute) proposed the Three-Schema Architecture (also known as the 3-Level Architecture of DBMS).


1. The Three-Level Database Architecture

The three-schema architecture divides the database system into three independent levels of abstraction:

ANSI/SPARC 3-Level Database Architecture
1. External / View Level
User Views (View 1, View 2, View 3)
➔ External-to-Conceptual Mapping ➔
2. Conceptual / Logical Level
All Entities, Attributes, Relationships & Constraints
➔ Conceptual-to-Internal Mapping ➔
3. Internal / Physical Level
Data files, Disk Blocks, Indexes & Compression on Disk

A. External Level (View Level - Highest Abstraction)

  • This is the level closest to end users.
  • Different users have different customized Views of the exact same data.
  • Example in a University Database:
    • A Student sees only their own roll number, attendance, and semester marks.
    • An Accounts Officer sees student fees paid, fee dues, and scholarship funds, but cannot edit grades.
    • A Professor sees student marks and assignment submissions, but cannot view salary records of colleagues.
  • Hides confidential or irrelevant data from specific user roles.

B. Conceptual Level (Logical Level - Middle Abstraction)

  • Describes what data is stored in the entire database and the relationships among the data.
  • It represents the single, unified global view of the entire organization’s data.
  • What it defines:
    • All database tables, columns, and data types (e.g., Students, Courses, Enrollments).
    • Business rules, integrity constraints (e.g., Age >= 17, Roll_No must be unique).
    • Security and authorization policies.
  • Database administrators (DBAs) and system designers work heavily at this level using conceptual models (like ER diagrams) and relational schemas.
  • It is completely independent of hardware and operating systems.

C. Internal Level (Physical Level - Lowest Abstraction)

  • Describes how data is physically stored on physical storage devices (Hard Disks, NVMe SSDs).
  • It deals with low-level computer hardware concepts:
    • Allocation of data blocks, sectors, and tracks.
    • Record storage formats (fixed-length vs. variable-length records).
    • Data compression, data encryption algorithms.
    • File organization methods (sequential, hashing, B+ trees) and index paths.
  • Managed directly by the DBMS storage engine and systems engineers.

2. What is Data Independence?

Data Independence is the ability to modify a schema definition at one level of the database system without having to alter the schema definition at the next higher level.

There are two major kinds of data independence:

The Two Levels of Data Independence
1. Physical Data Independence
Ability to modify the internal physical schema without altering the conceptual schema or application code.
2. Logical Data Independence
Ability to modify the conceptual schema without altering existing external views or user applications.

Detailed Comparison:

Feature Physical Data Independence Logical Data Independence
Levels Involved Between Internal Level and Conceptual Level Between Conceptual Level and External Level
What Can Be Changed? Switching from HDD to SSD, creating new B-Tree indexes, changing hashing algorithm or file compression Adding a new entity (e.g., Alumni), adding a new column to a table, splitting a table into two
Impact on Programs User applications require zero code changes Existing external views continue to function without rewriting code
Ease of Achievement Easy to achieve (handled automatically by DBMS) Harder to achieve because changes to logical structure frequently require updating views

3. Role and Responsibilities of the Database Administrator (DBA)

The Database Administrator (DBA) is the chief technical custodian of an enterprise database system. The DBA exercises central authority over database design, access policies, performance optimization, and disaster recovery.

Key Responsibilities of a DBA:

  1. Schema Definition and Modification: Designing the original conceptual and physical database schemas, and altering table structures when business requirements evolve.
  2. Storage Structure and Access-Method Definition: Deciding which indexing techniques (B+ Tree, Hashing) and storage formats to use for optimal query speed.
  3. Granting Authorization and Security Control: Deciding which users have access to which tables. Assigning usernames, passwords, and permissions (SELECT, INSERT, UPDATE, DELETE) to prevent unauthorized breaches.
  4. Routine Maintenance and Backups: Establishing periodic automated backup routines (hourly, daily, weekly) onto secure secondary servers or cloud storage to prevent catastrophic loss.
  5. Disaster Recovery and Restoration: Restoring the database to a clean, consistent state after hardware crashes, power outages, or accidental human deletion.
  6. Performance Tuning and Monitoring: Monitoring query bottlenecks, slow transactions, and disk space usage. Adding indexes or upgrading hardware to maintain high responsiveness.
  7. Liaison with Users and Management: Helping software developers write optimized queries and ensuring business policies are faithfully represented in the data design.

💡 DAVV Exam Preparation Tips

5-Mark Question: “Explain Physical Data Independence and Logical Data Independence. Which one is harder to achieve and why?”

  • Define both concepts clearly.
  • Explain that Logical Data Independence is harder to achieve because changing the logical structure of a table (e.g., splitting a table) often requires updating external views and application queries.

10-Mark Question: “Explain the Three-Schema Architecture (ANSI/SPARC) with a neat diagram. Discuss the functions of External, Conceptual, and Internal levels. What are the key duties of a Database Administrator (DBA)?”

  • Draw the 3-level vertical diagram showing mappings between levels.
  • Clearly define the External (views), Conceptual (global logical tables), and Internal (physical blocks/indexes) levels.
  • Detail at least 6 primary duties of a DBA (Schema design, Security, Backup/Recovery, Performance tuning).