Architecture of Database Management System

Evolution and Early Database Architecture

  • Data Base Task Group (DBTG) 1971 Proposal:
    • The initial standardizing effort for database management architecture was established by the Data Base Task Group (DBTG) in the year 1971.
    • It served as an early formal attempt to standardize database software development and data structuring methodologies across computing systems.
    • Introduced and recommended a foundational two-level architectural design consisting of:
    • Schema: The overall, central logical definition and structure of the complete database.
    • Subschema: The localized, individual user or application view representing a designated partition of the database.

Objectives of the Three-Level Architecture

  • Customized User Views:
    • Facilitates simultaneous access to identical underlying data while granting distinct, personalized data views tailored to the specific functional requirements of each user.
  • Physical Storage Insulation:
    • Ensures that end-user operations, query constructs, and application interactions remain completely decoupled from underlying storage implementation details.
  • Administrative Freedom for Physical Storage Adaptation:
    • Empowers the Database Administrator (DBA) to modify physical storage structures, index methods, or allocation algorithms without invalidating or altering external user views.
  • Hardware and Physical Device Independence:
    • Guarantees that the internal data organization remains completely unaffected by low-level physical storage modifications, including migrations to newly acquired storage media, disks, or controller technologies.
  • Administrative Freedom for Conceptual Schema Evolution:
    • Empowers the DBA to adjust, extend, or refine the global conceptual logical model of the enterprise without disrupting unaffected user groups or requiring system-wide application rewrites.

Structural Framework of the Three-Level Architecture

Three-Level Architecture of DBMS

  • The Three Architectural Tiers:
    • External Level (View Level): The top layer situated closest to end users, encapsulating distinct user perspectives.
    • Conceptual Level (Logical Level): The intermediate structural tier providing a generalized, unified, storage-independent model of all data elements.
    • Internal Level (Storage Level): The foundational layer positioned closest to physical computing hardware, specifying how records reside upon physical disks.
  • Responsibilities of the Database Administrator (DBA):
    • Solely responsible for building, authoring, and maintaining all database schemas across all architectural tiers.
    • Solely responsible for constructing the translation rules and mappings between adjacent schemas.
  • Operational Role of the Database Management System (DBMS):
    • Serves as the central coordination engine mediating communication among external views, conceptual representations, physical storage layouts, and the underlying stored database.

Architectural Levels in Detail

  • External Level (View Level):
    • Definition: Represents the specific operational window through which individual users or programs view the database; it contains strictly the data subset pertinent to an assigned role.
    • Proximity: Positioned directly adjacent to end users and external applications.
    • User Customization: Tailors display formats and fields according to specific user requirements:
    • Date Representation Example: One external user may require dates represented in the format (day, month, year), whereas an alternative external user requires dates formatted as (year, month, day).
    • Attribute Granularity Example: One administrative user may require access strictly to First Name, whereas another department necessitates both First Name and Last Name.
  • Conceptual Level (Logical Level):
    • Definition: Represents the holistic logical representation of the entire enterprise database, uniting all records into a single coherent structure.
    • Storage Independence: Intentionally contains zero storage-dependent or hardware-dependent specifications. It delineates structural types and character lengths without referencing byte counts, block layouts, or hardware allocation bounds.
    • Constituent Elements:
    • All structural entities, their respective descriptive attributes, and all inter-entity relationships.
    • Enterprise constraints, value boundaries, and business rules governing the data.
    • Comprehensive system security policies, authorization rules, and data integrity constraints.
  • Internal Level (Storage Level):
    • Definition: Defines the physical representation of the database within computer hardware, detailing the mechanics of physical persistence.
    • Primary Concerns and Responsibilities:
    • Allocation of physical disk space for table storage, record collections, and secondary search indexes.
    • Low-level record specifications for physical storage, including precise byte sizes for each individual field.
    • Physical record placement patterns and record clustering strategies on secondary storage.
    • Implementation of data compression mechanisms to optimize storage density.
    • Implementation of data encryption algorithms to secure raw stored bytes.

Database Schemas and Schema Classifications

  • Definition of Database Schema:
    • The comprehensive, overall descriptive specification defining the structures, rules, and formats of a database.
    • Each tier of the three-level architecture is formally documented via a distinct schema:
  • External Schema:
    • Defines the view level of the system; multiple external schemas typically coexist concurrently to support diverse user groups.
  • Conceptual Schema:
    • Formally defines the conceptual view, establishing all system entities, attributes, entity relationships, and operational integrity constraints.
  • Internal Schema (Storage Structure Definition):
    • Provides a complete, low-level technical description of the physical internal model.
    • Explicitly defines stored record formats, low-level representation schemes, physical field layouts, access paths, and indexing structures.

Mappings Across Architectural Views

  • Purpose of Schema Mappings:
    • Bridge structural boundaries between architectural tiers, enabling structural translation while isolating changes made at one level from adjacent levels.
  • External/Conceptual Mapping:
    • Links every individual external schema directly to the unified conceptual schema.
    • Translates individual logical records requested in an external view into one or more conceptual records defined at the conceptual tier.
    • Accommodates field aliases, modified ordering, and calculated attributes demanded by distinct user roles.
  • Conceptual/Internal Mapping:
    • Links the global conceptual schema directly to the physical internal schema.
    • Directs the DBMS on how to map a conceptual logical entity to the actual underlying physical records or record combinations resident in physical hardware storage.
    • Facilitates the resolution of abstract data definitions into concrete physical offsets and byte lengths.

Comprehensive System Example: University Management System

University Management System Three-Level Mapping Example

  • External Level Tier:
    • View 1 (Library User):
    • Roll Number
    • Name
    • Address
    • Book Number
    • Date of Issue (labeled Data of Issue)
    • Date of Return
    • View 2 (Account Office User):
    • Roll Number
    • Name
    • Fee
  • Conceptual Level Tier:
    • Combines all attributes across operational scopes into a single coherent logical definition:
    • Roll Number: Number (6)
    • Name: Character (20)
    • Address: Character (40)
    • Book Number: Number (6)
    • Date of Issue: Date
    • Date of Return: Date
    • Fee: Number (5+2)
  • Internal Level Tier (Storage Structure Definition):
    • Encapsulates byte allocations and precise memory displacement offsets:
    • Roll Number: Type=Byte(6), Offset=0
    • Name: Type=Byte(20), Offset=6
    • Address: Type=Byte(40), Offset=26
    • Book Number: Type=Byte(6), Offset=66
    • Date of Issue: Type=Byte(8), Offset=72
    • Date of Return: Type=Byte(8), Offset=80
    • Fee: Type=Byte(8), Offset=88
    • Offset calculation sequence:
    • Initial base byte displacement begins at 00.
    • Roll Number occupies 6 bytes6\text{ bytes}, setting the subsequent starting byte displacement to 66.
    • Name occupies 20 bytes20\text{ bytes}, advancing the subsequent displacement to 2626.
    • Address occupies 40 bytes40\text{ bytes}, advancing the subsequent displacement to 6666.
    • Book Number occupies 6 bytes6\text{ bytes}, advancing the displacement to 7272.
    • Date of Issue occupies 8 bytes8\text{ bytes}, advancing the displacement to 8080.
    • Date of Return occupies 8 bytes8\text{ bytes}, advancing the displacement to 8888.
    • Fee occupies 8 bytes8\text{ bytes}, culminating at an overall record length of 96 bytes96\text{ bytes}.

Data Independence in Layered Architecture

  • Core Principle of Data Independence:
    • Application software and user queries must be completely insulated from the underlying methods used to store, organize, and access data.
    • Achieved directly through the decoupling provided by the layered architecture of the DBMS.
  • Physical Data Independence:
    • Definition: The capacity to alter physical storage structures, index allocations, file organizations, or storage hardware without forcing modifications to the conceptual schema.
    • Absorption Mechanism: Any modifications applied at the internal level are absorbed entirely by updating the conceptual/internal mapping.
    • Operational Impact: Migrating storage to new disk models or re-indexing physical records does not require altering conceptual definitions or recompiling application code.
  • Logical Data Independence:
    • Definition: The capacity to expand or modify the conceptual schema without forcing alterations to existing external schemas or end-user programs.
    • Absorption Mechanism: Structural additions or adjustments at the conceptual tier are absorbed entirely by updating the relevant external/conceptual mapping.
    • Operational Impact: Adding a new entity, attribute, or relationship to the database leaves unaffected external user views completely functional without modification.

Procedure for Data Access by the DBMS

Procedure for Data Access by DBMS

  • Sequential Query and Data Retrieval Workflow:
    • Step 1 (User Query Submission): The user submits a command (User's Query) to the DBMS-user interface.
    • Step 2 (Record Level Request): The DBMS-user interface evaluates the query and issues a record request (Request specific record) to the Data Manager.
    • Step 3 (File Level Request): The Data Manager identifies the logical file housing the record and submits a file request (Request Specific File) to the File Manager.
    • Step 4 (Block I/O Dispatch): The File Manager determines the physical storage block locations and issues block instructions (Input/Output block (s)) to the Disk Manager.
    • Step 5 (Secondary Storage Retrieval): The Disk Manager addresses the physical secondary storage hardware (Database) to retrieve raw binary blocks (Block (s) from secondary storage).
    • Step 6 (Block Delivery to File Manager): The Disk Manager returns the retrieved physical blocks (Requested block (s)) directly to the File Manager.
    • Step 7 (Record Extraction): The File Manager parses the blocks to isolate the target record and transmits it (Requested record) to the Data Manager.
    • Step 8 (User Response Delivery): The Data Manager forwards the processed blocks and records (Block (s)) to the DBMS-user interface, which provides the final output (Response to user) back to the end user.