Component Modules of DBMS and their interactions

1. Input from Different Users

DBA Staff (Database Administrator)

  • They define the structure of the database using:

    • DDL Statements (Data Definition Language) → Used to create, modify, and delete database structures.

    • Privileged Commands → Special commands to manage security, user access, indexing, and configurations.

Casual Users

  • They use Interactive Queries (SQL statements like SELECT, INSERT, UPDATE, DELETE) to fetch or modify data.

Application Programmers

  • They write application programs that interact with the database.

  • Programs contain embedded SQL queries (DML Statements) to handle real-world data processing.

  • These programs need compilation and execution before interacting with the DBMS.

Parametric Users

Parametric users are users who regularly perform specific tasks using predefined queries and forms in a database.

  • They don’t write new queries but instead use existing canned transactions (precompiled SQL statements) to retrieve or update data

  • These users are not programmers or database designers but use the system as part of their job.

  • These users execute predefined transactions like:

    • Bank Transactions

    • Flight Ticket Booking

    • Order Processing

  • These are called Compiled (Canned) Transactions because they are pre-written and optimized for execution.


2. Processing Flow Inside the DBMS

The core processing inside DBMS happens in different stages. Let’s break it down.

A. Handling DDL (Database Definition Language)

  1. DDL Statements (like CREATE TABLE, ALTER TABLE) are processed by the DDL Compiler.

  2. The DDL Compiler updates the System Catalog (Data Dictionary), which stores metadata:

    • Table definitions

    • Column names, data types

    • Constraints (Primary key, Foreign key)

    • Indexing details

  3. This metadata is later used for query optimization and validation.


B. Handling DML (Data Manipulation Language)

DML Statements are used for modifying or retrieving data (SELECT, INSERT, UPDATE, DELETE). These can be sent from:

  • Application Programs (Precompiled)

  • Casual Users (Direct Queries)

1. Flow for Application Programs

🔹 Application programmers embed SQL queries inside their code.

  1. The code is first sent to the Precompiler, which extracts the SQL statements.

  2. The remaining application logic is sent to the Host Language Compiler (like Java, C++).

  3. The extracted DML statements are then compiled by the DML Compiler.

  4. The compiled queries are executed through the Run-Time Database Processor.

2. Flow for Interactive Queries

🔹 Casual users enter SQL queries directly (without application programs).

  1. The Query Compiler processes these queries.

  2. The System Catalog is checked to validate table existence, column names, and data types.

  3. The validated query is sent to the Run-Time Database Processor for execution.


C. Execution & Data Retrieval

Once the queries (either DML or Interactive Queries) are processed, execution happens:

  1. Run-Time Database Processor executes the query.

  2. It interacts with:

    • Stored Data Manager → Handles actual data retrieval or updates.

    • Stored Database → Where the actual data is stored.

  3. If required, it communicates with:

    • Concurrency Control Subsystem (to handle multiple user accesses at the same time).

    • Backup/Recovery Subsystem (to ensure data integrity in case of failures).

  4. The retrieved or modified data is then returned to the user/program.


D. Handling Precompiled Transactions (Canned Transactions)

  1. Some frequent queries (like ATM withdrawals, ticket bookings) are precompiled.

  2. These Compiled (Canned) Transactions directly interact with the Run-Time Database Processor for fast execution.

  3. This reduces processing time since queries don’t need to be recompiled every time.


3. Final Execution Flow Summary

  • DDL CommandsDDL CompilerSystem Catalog (Metadata) Update

  • DML Queries from ApplicationsPrecompiler → DML Compiler → Execution

  • Interactive QueriesQuery Compiler → Execution

  • Compiled TransactionsDirect Execution via Run-Time Database Processor

  • Execution → Stored Data Manager → Stored Database

  • Concurrency & Backup Subsystems Handle Failures & Multi-User Access